Skip to content

Commit

Permalink
change default value to null
Browse files Browse the repository at this point in the history
  • Loading branch information
bosiraphael committed Dec 17, 2024
1 parent 2787ce9 commit 090c539
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export const useCommandMenu = () => {
contextStoreCurrentViewTypeComponentState.atomFamily({
instanceId: 'command-menu',
}),
undefined,
null,
);

if (isCommandMenuOpened) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useEffect } from 'react';
export const ContextStoreCurrentViewTypeEffect = ({
viewType,
}: {
viewType: ContextStoreViewType | undefined;
viewType: ContextStoreViewType | null;
}) => {
const setContextStoreCurrentViewType = useSetRecoilComponentStateV2(
contextStoreCurrentViewTypeComponentState,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import { ContextStoreComponentInstanceContext } from '@/context-store/states/con
import { ContextStoreViewType } from '@/context-store/types/ContextStoreViewType';
import { createComponentStateV2 } from '@/ui/utilities/state/component-state/utils/createComponentStateV2';

export const contextStoreCurrentViewTypeComponentState = createComponentStateV2<
ContextStoreViewType | undefined
>({
key: 'contextStoreCurrentViewTypeComponentState',
defaultValue: undefined,
componentInstanceContext: ContextStoreComponentInstanceContext,
});
export const contextStoreCurrentViewTypeComponentState =
createComponentStateV2<ContextStoreViewType | null>({
key: 'contextStoreCurrentViewTypeComponentState',
defaultValue: null,
componentInstanceContext: ContextStoreComponentInstanceContext,
});

0 comments on commit 090c539

Please sign in to comment.