Skip to content

Commit

Permalink
computers are horrible
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Oct 21, 2024
1 parent 48df2d3 commit 0183bac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 2 additions & 1 deletion frontend/src/lib/lemon-ui/LemonCard/LemonCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export function LemonCard({
<div className="absolute top-2 right-2">
<LemonButton
icon={<IconX />}
onClick={() => {
onClick={(e) => {
e.stopPropagation()
onClose?.()
}}
type="tertiary"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,15 @@ const TemplateVariables = ({ template }: { template: ReplayTemplateType }): JSX.
const RecordingTemplateCard = ({ template }: { template: ReplayTemplateType }): JSX.Element => {
const { showVariables, hideVariables, navigate } = useActions(sessionReplayTemplatesLogic({ template }))
const { variablesVisible, variables } = useValues(sessionReplayTemplatesLogic({ template }))

return (
<LemonCard
className="w-80"
onClick={() => {
variables.length > 0 ? showVariables() : navigate()
}}
closeable={variablesVisible}
// TODO IN THIS PR: For some reason, this gets called with the correct template, but the variables don't hide.
// The change in selector value isn't triggering a refresh of the LemonCard component.
onClose={() => hideVariables()}
onClose={hideVariables}
>
<div className="flex flex-col gap-2">
<h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const getPageviewFilterValue = (pageview: string): UniversalFiltersGroupValue =>
}
}

type ReplayTemplateLogicPropsType = {
export interface ReplayTemplateLogicPropsType {
template: ReplayTemplateType
}

Expand All @@ -41,7 +41,7 @@ export const sessionReplayTemplatesLogic = kea<sessionReplayTemplatesLogicType>(
}),
reducers(({ props }) => ({
variables: [
props.template.variables as ReplayTemplateVariableType[],
props.template.variables,
{
setVariables: (_, { variables }) => variables,
setVariable: (state, { variable }) =>
Expand Down

0 comments on commit 0183bac

Please sign in to comment.