Make the sidebar collapsable (#260)
* Make the sidebar collapsable * Fix padding * Automatically collapase sidebar and hide container on mobile * Hide navbar content when navbar is collapsed * Update naming convention for states
This commit is contained in:
@ -3,6 +3,6 @@ import { atom } from 'recoil';
|
||||
import { User } from '@/users/interfaces/user.interface';
|
||||
|
||||
export const currentUserState = atom<User | null>({
|
||||
key: 'auth/current-user',
|
||||
key: 'currentUserState',
|
||||
default: null,
|
||||
});
|
||||
|
||||
@ -3,7 +3,7 @@ import { selector } from 'recoil';
|
||||
import { currentUserState } from './currentUserState';
|
||||
|
||||
export const isAuthenticatedState = selector<boolean>({
|
||||
key: 'auth/is-authenticated',
|
||||
key: 'isAuthenticatedState',
|
||||
get: ({ get }) => {
|
||||
const user = get(currentUserState);
|
||||
return !!user;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { atom } from 'recoil';
|
||||
|
||||
export const isAuthenticatingState = atom<boolean>({
|
||||
key: 'auth/is-authenticating',
|
||||
key: 'isAuthenticatingState',
|
||||
default: true,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user