Skip to content

Commit

Permalink
🦄 refactor: add import type
Browse files Browse the repository at this point in the history
Signed-off-by: Neko <[email protected]>
  • Loading branch information
NotEvenANeko committed Apr 30, 2022
1 parent 13ad590 commit d05cfa6
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 15 deletions.
8 changes: 7 additions & 1 deletion components/layout/appLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import { FC, useState, useEffect, useCallback, ReactNode } from 'react';
import {
type FC,
useState,
useEffect,
useCallback,
type ReactNode,
} from 'react';
import { Box, Theme, Slide, Fab } from '@mui/material';
import { ExpandLess } from '@mui/icons-material';
import { throttle } from 'throttle-debounce';
Expand Down
2 changes: 1 addition & 1 deletion components/layout/header/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FC, useState, useMemo, useCallback, useEffect } from 'react';
import { type FC, useState, useMemo, useCallback, useEffect } from 'react';
import {
Box,
Typography,
Expand Down
5 changes: 3 additions & 2 deletions components/markdown/common.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { FC, HTMLAttributes, useState, MouseEventHandler } from 'react';
import { Typography, SxProps } from '@mui/material';
import type { FC, HTMLAttributes, MouseEventHandler } from 'react';
import { useState } from 'react';
import { Typography, type SxProps } from '@mui/material';

import { HTitleLinkIcon } from './linkIcon';

Expand Down
2 changes: 1 addition & 1 deletion components/markdown/h.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FC, HTMLAttributes } from 'react';
import type { FC, HTMLAttributes } from 'react';

import { HTitleCommon } from './common';

Expand Down
2 changes: 1 addition & 1 deletion components/markdown/linkIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FC } from 'react';
import type { FC } from 'react';
import { Box, Fade } from '@mui/material';
import { Link as LinkIcon } from '@mui/icons-material';

Expand Down
2 changes: 1 addition & 1 deletion lib/hooks/useLoadMore.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BaseResponse } from 'lib/interfaces';
import type { BaseResponse } from 'lib/interfaces';
import { useCallback, useEffect, useState } from 'react';
import { throttle } from 'throttle-debounce';

Expand Down
2 changes: 1 addition & 1 deletion pages/404.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BodyHeader } from 'components/layout/bodyHeader';
import { NextPageWithLayout } from './_app';
import type { NextPageWithLayout } from './_app';

const Custom404: NextPageWithLayout = () => <></>;

Expand Down
2 changes: 1 addition & 1 deletion pages/500.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BodyHeader } from 'components/layout/bodyHeader';
import { NextPageWithLayout } from './_app';
import type { NextPageWithLayout } from './_app';

const Custom500: NextPageWithLayout = () => <></>;

Expand Down
2 changes: 1 addition & 1 deletion pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import '../styles/globals.css';
import { FC, ReactElement, ReactNode } from 'react';
import type { FC, ReactElement, ReactNode } from 'react';
import { createTheme, CssBaseline, ThemeProvider } from '@mui/material';
import Head from 'next/head';
import type { AppProps } from 'next/app';
Expand Down
2 changes: 1 addition & 1 deletion pages/friend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AccountCircle } from '@mui/icons-material';
import { Avatar, Grid, Box, Typography, type Theme } from '@mui/material';

import { getFriends } from 'lib';
import { NextPageWithLayout } from './_app';
import type { NextPageWithLayout } from './_app';
import { LinkContainer } from 'components/linkContainer';

const FriendPage: NextPageWithLayout<
Expand Down
6 changes: 3 additions & 3 deletions pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { InferGetStaticPropsType } from 'next';
import type { InferGetStaticPropsType } from 'next';
import Image from 'next/image';
import { Box, Stack, Typography, Theme, SxProps, Fade } from '@mui/material';
import { CalendarMonth, LocalOffer } from '@mui/icons-material';
import dayjs from 'dayjs';
import Link from 'next/link';
import type { FC, ReactNode } from 'react';

import { getPostsDetail } from 'lib';
import type { NextPageWithLayout } from './_app';
import Link from 'next/link';
import { FC, ReactNode } from 'react';
import { useLoadMore } from 'lib/hooks';
import { TagContainer, LinkContainer } from 'components';

Expand Down
2 changes: 1 addition & 1 deletion pages/post/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
H6Title,
} from 'components/markdown';
import { TagContainer, LinkContainer } from 'components';
import { NextPageWithLayout } from '../_app';
import type { NextPageWithLayout } from '../_app';

const MarkdownContainer = styled(Box)(({ theme }) => ({
padding: '0 5%',
Expand Down

0 comments on commit d05cfa6

Please sign in to comment.