-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
/
Copy pathpage.tsx
26 lines (21 loc) · 837 Bytes
/
page.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { notFound } from 'next/navigation';
import { serverFeatureFlags } from '@/config/featureFlags';
import { metadataModule } from '@/server/metadata';
import { translation } from '@/server/translation';
import { gerServerDeviceInfo, isMobileDevice } from '@/utils/server/responsive';
import Page from './index';
export const generateMetadata = async () => {
const { t } = await translation('setting');
return metadataModule.generate({
description: t('header.desc'),
title: t('tab.sync'),
url: '/settings/sync',
});
};
export default async () => {
const enableWebrtc = serverFeatureFlags().enableWebrtc;
if (!enableWebrtc) return notFound();
const isMobile = await isMobileDevice();
const { os, browser } = await gerServerDeviceInfo();
return <Page browser={browser} mobile={isMobile} os={os} />;
};