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:
Félix Malfait
2023-06-09 15:09:21 +02:00
committed by GitHub
parent 1d6f1f4551
commit f6e1e626fd
18 changed files with 163 additions and 48 deletions

View File

@ -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,
});

View File

@ -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;

View File

@ -1,6 +1,6 @@
import { atom } from 'recoil';
export const isAuthenticatingState = atom<boolean>({
key: 'auth/is-authenticating',
key: 'isAuthenticatingState',
default: true,
});