diff --git a/next.config.js b/next.config.js index 4b0478c..51c209a 100644 --- a/next.config.js +++ b/next.config.js @@ -1,9 +1,9 @@ const NEXT_BASE_PATH = process.env.NEXT_ASSET_PREFIX || ""; module.exports = require("@next/mdx")({ - extension: /\.mdx?$/ + extension: /\.mdx?$/, })({ pageExtensions: ["ts", "tsx", "md", "mdx"], assetPrefix: NEXT_BASE_PATH, - env: { NEXT_BASE_PATH } + env: { NEXT_BASE_PATH }, }); diff --git a/pages/_document.tsx b/pages/_document.tsx index a95ed23..bde136e 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -5,7 +5,7 @@ import Document, { Html, Head, Main, - NextScript + NextScript, } from "next/document"; import { ServerStyleSheets } from "@material-ui/styles"; import { theme } from "../styles/MainTheme"; @@ -15,12 +15,12 @@ export default class extends Document { const originalRenderPage = ctx.renderPage; ctx.renderPage = () => originalRenderPage({ - enhanceApp: App => props => sheets.collect() + enhanceApp: (App) => (props) => sheets.collect(), }); const initialProps = await Document.getInitialProps(ctx); return { ...initialProps, - styles: [initialProps.styles, sheets.getStyleElement()] + styles: [initialProps.styles, sheets.getStyleElement()], } as DocumentInitialProps; }; diff --git a/pages/query/[path].tsx b/pages/query/[path].tsx index 2ed6f8b..61f6bcd 100644 --- a/pages/query/[path].tsx +++ b/pages/query/[path].tsx @@ -8,7 +8,7 @@ export function getStaticProps({ params }: { params: unknown }) { return { props: params }; } -export default function({ path }: { path: string }) { +export default function ({ path }: { path: string }) { const { query } = useRouter(); return
{JSON.stringify({ path, ...query }, null, "  ")}
; } diff --git a/pages/todo.tsx b/pages/todo.tsx index 87b72a3..48ec06c 100644 --- a/pages/todo.tsx +++ b/pages/todo.tsx @@ -17,7 +17,7 @@ type Action = const initialState: State = { id: 0, - todo: new Map() + todo: new Map(), }; function reducer(state: State, action: Action) { @@ -44,7 +44,7 @@ export default () => { if (body.length === 0) return; dispatch({ type: "add", - body + body, }); }, [dispatch] diff --git a/routes.ts b/routes.ts index 43b03c3..3403188 100644 --- a/routes.ts +++ b/routes.ts @@ -3,6 +3,6 @@ import { Home, Info } from "@material-ui/icons"; const routes = [ { pathname: "/", icon: createElement(Home) }, - { pathname: "/about", icon: createElement(Info) } + { pathname: "/about", icon: createElement(Info) }, ]; export default routes; diff --git a/styles/MainTheme.tsx b/styles/MainTheme.tsx index 2adff78..2097321 100644 --- a/styles/MainTheme.tsx +++ b/styles/MainTheme.tsx @@ -23,21 +23,21 @@ const isValidURL = (url: string) => { export const theme = createMuiTheme({ palette: { primary: { - main: orange[900] + main: orange[900], }, secondary: { - main: teal[400] - } + main: teal[400], + }, }, typography: { - fontFamily: "sans-serif" - } + fontFamily: "sans-serif", + }, }); export const components: { [key in keyof HTMLElementTagNameMap]?: React.FC; } = { - h1: props => ( + h1: (props) => ( <> {props.children} @@ -45,11 +45,11 @@ export const components: { ), - h2: props => , - h3: props => , - h4: props => , - h5: props => , - h6: props => , + h2: (props) => , + h3: (props) => , + h4: (props) => , + h5: (props) => , + h6: (props) => , a: ({ href, ...props }: { href: string }) => { const url = `${process.env.NEXT_BASE_PATH}${href}`; return isValidURL(href) ? ( @@ -60,7 +60,7 @@ export const components: { ); }, - p: props => + p: (props) => , }; const MainTheme: React.FC = ({ children }) => ( diff --git a/styles/TopAppBar.tsx b/styles/TopAppBar.tsx index a7b36b1..91cf74a 100644 --- a/styles/TopAppBar.tsx +++ b/styles/TopAppBar.tsx @@ -10,7 +10,7 @@ const TopAppBar = () => { const router = useRouter(); const pathname = ( routes.find(({ pathname }) => pathname === router.pathname) || { - pathname: "/" + pathname: "/", } ).pathname; return (