File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,8 @@ export function ChatWindow(): JSX.Element {
119
119
void Promise . all (
120
120
unreadMessages . map ( ( message ) => markAsRead ( message . id ) )
121
121
) ;
122
- } } ) ;
122
+ }
123
+ } ) ;
123
124
124
125
const handleSubmit = async ( e : React . FormEvent ) : Promise < void > => {
125
126
e . preventDefault ( ) ;
Original file line number Diff line number Diff line change 1
- import { useAuth } from " @lib/context/auth-context" ;
2
- import type { User } from " @lib/types/user" ;
3
- import { useRouter } from " next/router" ;
4
- import { useEffect } from " react" ;
1
+ import { useAuth } from ' @lib/context/auth-context' ;
2
+ import type { User } from ' @lib/types/user' ;
3
+ import { useRouter } from ' next/router' ;
4
+ import { useEffect } from ' react' ;
5
5
6
6
export function useRequireAuth ( redirectUrl ?: string ) : User | null {
7
7
const { user, loading } = useAuth ( ) ;
8
8
const { replace } = useRouter ( ) ;
9
9
10
10
useEffect ( ( ) => {
11
- if ( ! loading && ! user ) void replace ( redirectUrl ?? "/" ) ;
11
+ if ( ! loading && ! user ) void replace ( redirectUrl ?? '/' ) ;
12
12
// eslint-disable-next-line react-hooks/exhaustive-deps
13
13
} , [ user , loading ] ) ;
14
14
You can’t perform that action at this time.
0 commit comments