Skip to content

Commit 046ef5d

Browse files
committed
Fix streaming page
1 parent fbc823f commit 046ef5d

2 files changed

Lines changed: 32 additions & 2 deletions

File tree

frontend/src/pages/hotels/index.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import type { GetServerSideProps } from "next";
2-
import { useRouter } from "next/router";
32
import { getApolloClient } from "~/apollo/client";
43
import { PageHandler } from "~/components/page-handler";
54
import { getProps } from "~/components/page-handler/page-static-props";
65

76
export const HotelsPage = ({ blocksProps, isPreview, previewData }) => {
8-
const router = useRouter();
97
return (
108
<PageHandler
119
isPreview={isPreview}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import type { GetServerSideProps } from "next";
2+
import { getApolloClient } from "~/apollo/client";
3+
import { PageHandler } from "~/components/page-handler";
4+
import { getProps } from "~/components/page-handler/page-static-props";
5+
6+
export const StreamingPage = ({ blocksProps, isPreview, previewData }) => {
7+
return (
8+
<PageHandler
9+
isPreview={isPreview}
10+
previewData={previewData}
11+
slug="streaming"
12+
blocksProps={blocksProps}
13+
/>
14+
);
15+
};
16+
17+
export const getServerSideProps: GetServerSideProps = async (context: any) => {
18+
const { req } = context;
19+
const client = getApolloClient(null, req.cookies);
20+
return getProps(
21+
{
22+
...context,
23+
params: {
24+
slug: "streaming",
25+
},
26+
},
27+
client,
28+
null,
29+
);
30+
};
31+
32+
export default StreamingPage;

0 commit comments

Comments
 (0)