fix: pc check (#3447)

* fix: pc check

* fix: pc check
This commit is contained in:
Archer
2024-12-21 12:28:32 +08:00
committed by GitHub
parent e5b8dea9ae
commit ae149069bf
2 changed files with 2 additions and 2 deletions

View File

@@ -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)),

View File

@@ -23,7 +23,7 @@ const SystemStoreContextProvider = ({
device
}: {
children: ReactNode;
device?: 'pc' | 'mobile';
device?: 'pc' | 'mobile' | null;
}) => {
const [isPc] = useMediaQuery('(min-width: 900px)');