Skip to content

Commit ae14906

Browse files
authored
fix: pc check (#3447)
* fix: pc check * fix: pc check
1 parent e5b8dea commit ae14906

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/web/common/system/nextjs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const serviceSideProps = async (content: any, ns: I18nNsType = []) => {
66
const extraLng = content.req?.cookies?.NEXT_LOCALE ? undefined : content.locales;
77

88
// Device size
9-
const deviceSize = content.req?.cookies?.NEXT_DEVICE_SIZE || 'pc';
9+
const deviceSize = content.req?.cookies?.NEXT_DEVICE_SIZE || null;
1010

1111
return {
1212
...(await serverSideTranslations(lang, ['common', ...ns], null, extraLng)),

packages/web/context/useSystem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const SystemStoreContextProvider = ({
2323
device
2424
}: {
2525
children: ReactNode;
26-
device?: 'pc' | 'mobile';
26+
device?: 'pc' | 'mobile' | null;
2727
}) => {
2828
const [isPc] = useMediaQuery('(min-width: 900px)');
2929

0 commit comments

Comments
 (0)