File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1
- import { ConfigHelper } from "@/helpers" ;
1
+ "use server" ;
2
+
3
+ import { ConfigHelper , EnvironmentHelper } from "@/helpers" ;
2
4
import { ManageVideoClient } from "./ManageVideoClient" ;
3
5
4
6
5
7
type Params = Promise < { sdSlug : string } > ;
6
8
7
9
8
10
export default async function ManageVideoPage ( { params } : { params : Params } ) {
9
- const { sdSlug} = await params
11
+ await EnvironmentHelper . initServerSide ( ) ;
12
+ const { sdSlug} = await params
13
+
10
14
const config = await ConfigHelper . load ( sdSlug . toString ( ) ) ;
11
15
return < ManageVideoClient config = { config } /> ;
12
16
}
Original file line number Diff line number Diff line change @@ -6,16 +6,17 @@ import { SiteHeader } from "@churchapps/apphelper";
6
6
7
7
import UserContext from "@/context/UserContext" ;
8
8
import { SecondaryMenuHelper } from "@/helpers/SecondaryMenuHelper" ;
9
- import { useRouter } from "next/navigation" ;
9
+ import { useRouter , usePathname } from "next/navigation" ;
10
10
11
11
export function AdminHeader ( ) {
12
12
const context = React . useContext ( UserContext ) ;
13
13
const router = useRouter ( ) ;
14
+ const pathname = usePathname ( ) ;
14
15
const [ primaryLabel , setPrimaryLabel ] = React . useState < string > ( "Dashboard" ) ;
15
16
16
17
useEffect ( ( ) => {
17
18
getPrimaryLabel ( ) ;
18
- } , [ window . location . pathname ] ) ;
19
+ } , [ pathname ] ) ;
19
20
20
21
21
22
const getPrimaryMenu = ( ) => {
You can’t perform that action at this time.
0 commit comments