3959 create a activationstatus in coreworkspace and use it in front to redirect properly (#3989)
* Add computed field to workspace entity * Add activationStatus to front requests * Update Selector * Use activation status * Stop using selector for mock values * Remove isCurrentWorkspaceActiveSelector * Use activation status * Fix typo * Use activation status * Create hook for sign in up navigate * Update hook to handle profile creation * Use varaible * Use more readable boolean function
This commit is contained in:
@ -31,14 +31,14 @@ const meta: Meta<typeof CommandMenu> = {
|
||||
const setCurrentWorkspaceMember = useSetRecoilState(
|
||||
currentWorkspaceMemberState,
|
||||
);
|
||||
const { addToCommandMenu, setToIntitialCommandMenu, openCommandMenu } =
|
||||
const { addToCommandMenu, setToInitialCommandMenu, openCommandMenu } =
|
||||
useCommandMenu();
|
||||
|
||||
setCurrentWorkspace(mockDefaultWorkspace);
|
||||
setCurrentWorkspaceMember(mockedWorkspaceMemberData);
|
||||
|
||||
useEffect(() => {
|
||||
setToIntitialCommandMenu();
|
||||
setToInitialCommandMenu();
|
||||
addToCommandMenu([
|
||||
{
|
||||
id: 'create-task',
|
||||
@ -58,7 +58,7 @@ const meta: Meta<typeof CommandMenu> = {
|
||||
},
|
||||
]);
|
||||
openCommandMenu();
|
||||
}, [addToCommandMenu, setToIntitialCommandMenu, openCommandMenu]);
|
||||
}, [addToCommandMenu, setToInitialCommandMenu, openCommandMenu]);
|
||||
|
||||
return <Story />;
|
||||
},
|
||||
|
||||
@ -107,11 +107,11 @@ describe('useCommandMenu', () => {
|
||||
expect(onClickMock).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it('should setToIntitialCommandMenu command menu', () => {
|
||||
it('should setToInitialCommandMenu command menu', () => {
|
||||
const { result } = renderHooks();
|
||||
|
||||
act(() => {
|
||||
result.current.commandMenu.setToIntitialCommandMenu();
|
||||
result.current.commandMenu.setToInitialCommandMenu();
|
||||
});
|
||||
|
||||
expect(result.current.commandMenuCommands.length).toBe(5);
|
||||
|
||||
@ -61,7 +61,7 @@ export const useCommandMenu = () => {
|
||||
[setCommands],
|
||||
);
|
||||
|
||||
const setToIntitialCommandMenu = () => {
|
||||
const setToInitialCommandMenu = () => {
|
||||
setCommands(commandMenuCommands);
|
||||
};
|
||||
|
||||
@ -87,6 +87,6 @@ export const useCommandMenu = () => {
|
||||
toggleCommandMenu,
|
||||
addToCommandMenu,
|
||||
onItemClick,
|
||||
setToIntitialCommandMenu,
|
||||
setToInitialCommandMenu,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user