Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
angorayc committed Oct 1, 2024
1 parent 0856719 commit ca0da36
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,9 @@ import { useCompletedCards } from './hooks/use_completed_cards';

export const OnboardingBody = React.memo(() => {
const bodyConfig = useBodyConfig();
const { expandedCardId, setExpandedCardId } = useExpandedCard(spaceId);
const { isCardComplete, setCardComplete } = useCompletedCards(spaceId);

const { checkAllCardsComplete, checkCardComplete } = useCheckCompleteCards(
bodyConfig,
setCardComplete
);

useEffect(() => {
// initial auto-check for all cards
checkAllCardsComplete();
}, [checkAllCardsComplete]);
const { expandedCardId, setExpandedCardId } = useExpandedCard();
const { isCardComplete, setCardComplete, getCardCheckCompleteResult, checkCardComplete } =
useCompletedCards(bodyConfig);

const createOnToggleExpanded = useCallback(
(cardId: OnboardingCardId) => () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,17 @@ export const useStoredExpandedCardId = (spaceId: string) =>
);

/**
* Stores either the video card has been visited or not, per space
* Stores the selected integration tab ID per space
*/
export const useStoredHasVideoVisited = (spaceId: string) =>
useDefinedLocalStorage<boolean>(`${LocalStorageKey.videoVisited}.${spaceId}`, false);

export const useStoredIntegrationTabId = (spaceId: string, defaultSelectedTabId: string) =>
useDefinedLocalStorage<string>(
`${LocalStorageKey.selectedIntegrationTabId}.${spaceId}`,
defaultSelectedTabId
);

/**
* Stores the integration search term per space
*/
export const useStoredIntegrationSearchTerm = (spaceId: string) =>
useDefinedLocalStorage<string | null>(
`${LocalStorageKey.IntegrationSearchTerm}.${spaceId}`,
Expand Down

0 comments on commit ca0da36

Please sign in to comment.