Fix Zustand imports

This commit is contained in:
ajnart
2023-02-11 08:58:09 +09:00
parent 023e44f523
commit 4f652c71ba
5 changed files with 14 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
import create from 'zustand'; import { create } from 'zustand';
interface EditModeState { interface EditModeState {
enabled: boolean; enabled: boolean;

View File

@@ -1,5 +1,5 @@
import { useMantineTheme } from '@mantine/core'; import { useMantineTheme } from '@mantine/core';
import create from 'zustand'; import { create } from 'zustand';
import { useConfigContext } from '../../../../config/provider'; import { useConfigContext } from '../../../../config/provider';
import { GridstackBreakpoints } from '../../../../constants/gridstack-breakpoints'; import { GridstackBreakpoints } from '../../../../constants/gridstack-breakpoints';

View File

@@ -1,5 +1,5 @@
import axios from 'axios'; import axios from 'axios';
import create from 'zustand'; import { create } from 'zustand';
import { ConfigType } from '../types/config'; import { ConfigType } from '../types/config';
export const useConfigStore = create<UseConfigStoreType>((set, get) => ({ export const useConfigStore = create<UseConfigStoreType>((set, get) => ({

View File

@@ -9,6 +9,7 @@ import {
} from '@mantine/core'; } from '@mantine/core';
import React from 'react'; import React from 'react';
import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
import Link from 'next/link'; import Link from 'next/link';
const useStyles = createStyles((theme) => ({ const useStyles = createStyles((theme) => ({
@@ -93,3 +94,12 @@ export default function Custom404() {
</Container> </Container>
); );
} }
export async function getStaticProps({ locale }: { locale: string }) {
return {
props: {
...(await serverSideTranslations(locale, ['common'])),
// Will be passed to the page component as props
},
};
}

View File

@@ -1,4 +1,4 @@
import create from 'zustand'; import { create } from 'zustand';
import { ServerSidePackageAttributesType } from '../../server/getPackageVersion'; import { ServerSidePackageAttributesType } from '../../server/getPackageVersion';