Commit ae149069 by Archer Committed by GitHub

fix: pc check (#3447)

* fix: pc check

* fix: pc check
parent e5b8dea9
......@@ -6,7 +6,7 @@ export const serviceSideProps = async (content: any, ns: I18nNsType = []) => {
const extraLng = content.req?.cookies?.NEXT_LOCALE ? undefined : content.locales;
// Device size
const deviceSize = content.req?.cookies?.NEXT_DEVICE_SIZE || 'pc';
const deviceSize = content.req?.cookies?.NEXT_DEVICE_SIZE || null;
return {
...(await serverSideTranslations(lang, ['common', ...ns], null, extraLng)),
......
......@@ -23,7 +23,7 @@ const SystemStoreContextProvider = ({
device
}: {
children: ReactNode;
device?: 'pc' | 'mobile';
device?: 'pc' | 'mobile' | null;
}) => {
const [isPc] = useMediaQuery('(min-width: 900px)');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment