Commit 0b9b899 1 parent 2124080 commit 0b9b899 Copy full SHA for 0b9b899
File tree 2 files changed +5
-3
lines changed
app/videos/@videomodal/p/[id]
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,9 @@ export default async function PhotoPage({
9
9
const p = await params ;
10
10
return (
11
11
< StorageWrapper >
12
- < PhotoImage photoId = { p . id } video = { true } />
12
+ < div >
13
+ < PhotoImage photoId = { p . id } video = { true } />
14
+ </ div >
13
15
</ StorageWrapper >
14
16
) ;
15
17
}
Original file line number Diff line number Diff line change @@ -4,16 +4,17 @@ import { Button } from "@headlessui/react";
4
4
import { useQuery } from "@tanstack/react-query" ;
5
5
import { useAppSelector } from "@/store/hooks" ;
6
6
import { Photo , Video } from "pexels" ;
7
- import { dynamicConfig } from "@/utils/dynamicConfig" ;
8
7
9
8
export default function PhotoImage ( {
10
9
photoId,
11
10
photo : photoSSR ,
12
11
video,
12
+ API_URL
13
13
} : {
14
14
photoId : string ;
15
15
photo ?: Photo ;
16
16
video ?: boolean ;
17
+ API_URL :string ;
17
18
} ) {
18
19
const router = useRouter ( ) ;
19
20
const goBack = ( ) => router . back ( ) ;
@@ -30,7 +31,6 @@ export default function PhotoImage({
30
31
} catch ( err ) {
31
32
console . error ( "err" , ( err as Error ) ?. message || err ) ;
32
33
}
33
- const API_URL = ( await dynamicConfig ) . API_URL ;
34
34
const f = await fetch ( API_URL + "pexels/" + photoId ) ;
35
35
return f . json ( ) ;
36
36
} ,
You can’t perform that action at this time.
0 commit comments