Skip to content

Commit

Permalink
fix missing callouts in create template preview (#7482)
Browse files Browse the repository at this point in the history
Co-authored-by: Petar Kolev <[email protected]>
  • Loading branch information
bobbykolev and reactoholic authored Jan 22, 2025
1 parent d350ece commit 9820d35
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@ interface CollaborationTemplatePreviewProps {
innovationFlow?: {
states: InnovationFlowState[];
};
callouts?: InnovationFlowCalloutsPreviewProps['callouts'];
calloutsSet?: {
callouts?: InnovationFlowCalloutsPreviewProps['callouts'];
};
};
};
}

const CollaborationTemplatePreview = ({ template, loading }: CollaborationTemplatePreviewProps) => {
const [selectedState, setSelectedState] = useState<string | undefined>(undefined);
const templateStates = template?.collaboration?.innovationFlow?.states ?? [];
const callouts = template?.collaboration?.calloutsSet?.callouts ?? [];

useEffect(() => {
if (
Expand Down Expand Up @@ -55,11 +58,7 @@ const CollaborationTemplatePreview = ({ template, loading }: CollaborationTempla
onSelectState={state => setSelectedState(state.displayName)}
/>
)}
<InnovationFlowCalloutsPreview
callouts={template?.collaboration?.callouts}
selectedState={selectedState}
loading={loading}
/>
<InnovationFlowCalloutsPreview callouts={callouts} selectedState={selectedState} loading={loading} />
</PageContentBlock>
);
};
Expand Down

0 comments on commit 9820d35

Please sign in to comment.