-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor/fix: split into components, fix imports and fix item loading…
… bug after login (#12) (TT-1779) * remove unecessary useEffect in UserDetails * refactor: create context for theme * refactor: use react import, use dynamic time to refresh from token expiry variable * refactor: more usage of context for theme * refactor: split item registration page into multiple components to better follow 'thinking in react' * fix: wait to load items until user is authenticated to prevent items not being fetched * Move theme toggler to its own component * useAuth directly in userdetails component * Apply suggestion
- Loading branch information
1 parent
9b4b3cb
commit 4620af0
Showing
17 changed files
with
435 additions
and
330 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
'use client'; | ||
|
||
import {AuthProvider} from '@/app/AuthProvider'; | ||
import {AuthProvider} from '@/providers/AuthProvider'; | ||
import {NextUIProvider} from '@nextui-org/react'; | ||
import React from 'react'; | ||
import {ReactNode, StrictMode} from 'react'; | ||
|
||
export function Providers({children}: { children: React.ReactNode }) { | ||
export function Providers({children}: { children: ReactNode }) { | ||
return ( | ||
<AuthProvider> | ||
<React.StrictMode> | ||
<StrictMode> | ||
<NextUIProvider locale='nb-NO'> | ||
{children} | ||
</NextUIProvider> | ||
</React.StrictMode> | ||
</StrictMode> | ||
</AuthProvider> | ||
); | ||
} |
Oops, something went wrong.