File tree Expand file tree Collapse file tree 3 files changed +24
-25
lines changed Expand file tree Collapse file tree 3 files changed +24
-25
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,6 @@ export function useCommandDefinitionMap() {
72
72
const allCommands : CommandDefinitionMap = {
73
73
...navCommands ,
74
74
...orgCommands ,
75
- // Add any other global commands here
76
75
...useConnectionCommands ( ) ,
77
76
}
78
77
return allCommands
Original file line number Diff line number Diff line change @@ -4,25 +4,28 @@ import {AppLayout} from '@openint/ui-v1'
4
4
import { OrganizationSwitcher , UserButton } from '@/lib-client/auth.client'
5
5
import { currentViewer } from '@/lib-server/auth.server'
6
6
import { GlobalCommandBarProvider } from '../../GlobalCommandBarProvider'
7
+ import { ClientApp } from './client'
7
8
8
9
export default async function AuthenticatedLayout ( {
9
10
children,
10
11
} : {
11
12
children : React . ReactNode
12
13
} ) {
13
- const { viewer} = await currentViewer ( )
14
+ const { viewer, token = '' } = await currentViewer ( )
14
15
console . log ( 'AuthenticatedLayout viewer' , viewer )
15
16
if ( viewer . role !== 'user' ) {
16
17
return redirect ( '/console/sign-in' )
17
18
}
18
19
19
20
return (
20
- < GlobalCommandBarProvider >
21
- < AppLayout
22
- organizationSwitcher = { < OrganizationSwitcher /> }
23
- userButton = { < UserButton showName /> } >
24
- { children }
25
- </ AppLayout >
26
- </ GlobalCommandBarProvider >
21
+ < ClientApp token = { token } >
22
+ < GlobalCommandBarProvider >
23
+ < AppLayout
24
+ organizationSwitcher = { < OrganizationSwitcher /> }
25
+ userButton = { < UserButton showName /> } >
26
+ { children }
27
+ </ AppLayout >
28
+ </ GlobalCommandBarProvider >
29
+ </ ClientApp >
27
30
)
28
31
}
Original file line number Diff line number Diff line change @@ -80,22 +80,19 @@ export default async function Page(props: PageProps) {
80
80
< pre >
81
81
< code > { JSON . stringify ( viewer , null , 2 ) } </ code >
82
82
</ pre >
83
- < ClientApp token = { token } >
84
- < h1 > AddConnection</ h1 >
85
- < Suspense fallback = { < Fallback /> } >
86
- < AddConnection
87
- initialData = { withRandomDelay ( api . listConnectorConfigs ( ) ) }
88
- />
89
- </ Suspense >
90
-
91
- < h1 > ConnectionList</ h1 >
92
-
93
- < Suspense fallback = { < Fallback /> } >
94
- < ConnectionList
95
- initialData = { withRandomDelay ( api . listConnections ( ) ) }
96
- />
97
- </ Suspense >
98
- </ ClientApp >
83
+
84
+ < h1 > AddConnection</ h1 >
85
+ < Suspense fallback = { < Fallback /> } >
86
+ < AddConnection
87
+ initialData = { withRandomDelay ( api . listConnectorConfigs ( ) ) }
88
+ />
89
+ </ Suspense >
90
+
91
+ < h1 > ConnectionList</ h1 >
92
+
93
+ < Suspense fallback = { < Fallback /> } >
94
+ < ConnectionList initialData = { withRandomDelay ( api . listConnections ( ) ) } />
95
+ </ Suspense >
99
96
100
97
< hr />
101
98
< hr />
You can’t perform that action at this time.
0 commit comments