Skip to content

Commit

Permalink
fix(type): type import로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
J1min committed Apr 24, 2023
1 parent 0605b82 commit 4a5d434
Show file tree
Hide file tree
Showing 33 changed files with 41 additions and 37 deletions.
2 changes: 1 addition & 1 deletion components/artwork/ArtworkCommentList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useState } from "react";
import { useRouter } from "next/router";
import { toast } from "react-toastify";
import { useQueryClient } from "@tanstack/react-query";
import { Artwork } from "@/types/artwork.interface";
import type { Artwork } from "@/types/artwork.interface";
import httpClient from "@/apis";
import useAuthUser from "@/hooks/useAuthUser";
import KEY from "@/key";
Expand Down
2 changes: 1 addition & 1 deletion components/artwork/ArtworkDetail.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Artwork } from "@/types/artwork.interface";
import type { Artwork } from "@/types/artwork.interface";
import { toast } from "react-toastify";
import { CopyToClipboard } from "react-copy-to-clipboard";
import { useRouter } from "next/router";
Expand Down
2 changes: 1 addition & 1 deletion components/artwork/ArtworkPlayer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Artwork } from "@/types/artwork.interface";
import type { Artwork } from "@/types/artwork.interface";
import Image from "next/image";
import * as S from "./ArtworkPlayer.style";

Expand Down
2 changes: 1 addition & 1 deletion components/artwork/Comment.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Artwork, Comment } from "@/types/artwork.interface";
import type { Artwork, Comment } from "@/types/artwork.interface";
import styled from "styled-components";
import { useReducer, useRef, useState } from "react";
import { useQueryClient } from "@tanstack/react-query";
Expand Down
2 changes: 1 addition & 1 deletion components/atoms/Artwork.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { toast } from "react-toastify";
import { useQueryClient } from "@tanstack/react-query";
import { Artwork } from "@/types/artwork.interface";
import type { Artwork } from "@/types/artwork.interface";
import config from "@/config";
import { useState } from "react";
import KEY from "@/key";
Expand Down
4 changes: 2 additions & 2 deletions components/atoms/ArtworkList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { useInView } from "react-intersection-observer";
import styled from "styled-components";
import { useEffect } from "react";
import theme from "@/styles/theme";
import { FetchNextPageType } from "@/types/common.interface";
import { Artwork } from "@/types/artwork.interface";
import type { FetchNextPageType } from "@/types/common.interface";
import type { Artwork } from "@/types/artwork.interface";
import ButtonList from "../app/ButtonList";
import ArtworkView from "./Artwork";
import * as S from "./Artwork.style";
Expand Down
2 changes: 1 addition & 1 deletion components/atoms/Button.style.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import theme from "@/styles/theme";
import { Varient } from "@/types/atoms.interface";
import type { Varient } from "@/types/atoms.interface";
import styled from "styled-components";

interface StyledButtonProps {
Expand Down
2 changes: 1 addition & 1 deletion components/atoms/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Varient } from "@/types/atoms.interface";
import type { Varient } from "@/types/atoms.interface";
import { ButtonHTMLAttributes, MouseEventHandler, ReactNode } from "react";
import * as S from "./Button.style";

Expand Down
2 changes: 1 addition & 1 deletion components/atoms/Input.style.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import theme from "@/styles/theme";
import { Varient } from "@/types/atoms.interface";
import type { Varient } from "@/types/atoms.interface";
import styled from "styled-components";

interface InputProps {
Expand Down
2 changes: 1 addition & 1 deletion components/atoms/Input.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Varient } from "@/types/atoms.interface";
import type { Varient } from "@/types/atoms.interface";
import { InputHTMLAttributes } from "react";
import { UseFormRegisterReturn } from "react-hook-form";
import * as S from "./Input.style";
Expand Down
2 changes: 1 addition & 1 deletion components/atoms/TagList.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useRouter } from "next/router";
import { Tag } from "@/types/artwork.interface";
import type { Tag } from "@/types/artwork.interface";
import TagView from "./Tag";
import * as S from "./TagList.style";

Expand Down
2 changes: 1 addition & 1 deletion components/common/Header/LoginedUser.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Button from "@/components/atoms/Button";
import { Member } from "@/types/user.interface";
import type { Member } from "@/types/user.interface";
import Image from "next/image";
import { useRouter } from "next/router";
import * as S from "./LoginedUser.style";
Expand Down
2 changes: 1 addition & 1 deletion components/common/Modal/View.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from "styled-components";
import { ModalState } from "@/types/modal.interface";
import type { ModalState } from "@/types/modal.interface";
import XIcon from "@/components/icons/common/XIcon";

interface ModalViewProps extends ModalState {
Expand Down
2 changes: 1 addition & 1 deletion components/editor/Toolbar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EditButtonArgument, ShortCut } from "@/types/editor.interface";
import type { EditButtonArgument, ShortCut } from "@/types/editor.interface";
import { useRouter } from "next/router";
import { toast } from "react-toastify";
import {
Expand Down
2 changes: 1 addition & 1 deletion components/editor/ToolbarButton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EditButtonArgument } from "@/types/editor.interface";
import type { EditButtonArgument } from "@/types/editor.interface";
import * as S from "./ToolbarButton.style";

export default function ToolbarButtonView({
Expand Down
2 changes: 1 addition & 1 deletion components/editor/edit/DragDropView.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ShortCut } from "@/types/editor.interface";
import type { ShortCut } from "@/types/editor.interface";
import { deepcopy, reorder } from "@/utils/array";
import { Dispatch, SetStateAction, useEffect, useState } from "react";
import { DragDropContext, Droppable, DropResult } from "react-beautiful-dnd";
Expand Down
2 changes: 1 addition & 1 deletion components/editor/edit/EditorEditApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { toast } from "react-toastify";
import { useEffect, useState } from "react";
import { useShortCutList } from "@/model/editor";
import { useQueryClient } from "@tanstack/react-query";
import { ShortCut } from "@/types/editor.interface";
import type { ShortCut } from "@/types/editor.interface";
import httpClient from "@/apis";
import KEY from "@/key";
import DragDropView from "./DragDropView";
Expand Down
2 changes: 1 addition & 1 deletion components/profile/ProfileInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useRouter } from "next/router";
import config from "@/config";
import { Member } from "@/types/user.interface";
import type { Member } from "@/types/user.interface";
import Avatar from "../atoms/Avatar";
import Button from "../atoms/Button";
import * as S from "./ProfileInfo.style";
Expand Down
2 changes: 1 addition & 1 deletion components/upload/ArtworkForm.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ArtworkForm } from "@/types/artwork.interface";
import type { ArtworkForm } from "@/types/artwork.interface";
import { UseFormRegister } from "react-hook-form";
import Input from "../atoms/Input";
import TextArea from "../atoms/TextArea";
Expand Down
2 changes: 1 addition & 1 deletion components/upload/ArtworkTypeRadio.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ArtworkForm } from "@/types/artwork.interface";
import type { ArtworkForm } from "@/types/artwork.interface";
import { UseFormRegister } from "react-hook-form";
import Radio from "../atoms/Radio";

Expand Down
2 changes: 1 addition & 1 deletion components/upload/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ArtworkForm } from "@/types/artwork.interface";
import type { ArtworkForm } from "@/types/artwork.interface";
import { useEffect, useState } from "react";
import { SubmitErrorHandler, SubmitHandler, useForm } from "react-hook-form";
import useFileDrop from "@/hooks/useFileDrop";
Expand Down
2 changes: 1 addition & 1 deletion context/modal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ModalState } from "@/types/modal.interface";
import type { ModalState } from "@/types/modal.interface";
import { atom } from "recoil";

const modalState = atom<ModalState>({
Expand Down
6 changes: 3 additions & 3 deletions fixture/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Artwork, Tag } from "@/types/artwork.interface";
import { ShortCut } from "@/types/editor.interface";
import { Member } from "@/types/user.interface";
import type { Artwork, Tag } from "@/types/artwork.interface";
import type { ShortCut } from "@/types/editor.interface";
import type { Member } from "@/types/user.interface";

const shortCutList: ShortCut[] = [
{ shortcutId: 0, content: "미카모" },
Expand Down
3 changes: 1 addition & 2 deletions fixture/property.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ import H4Icon from "@/components/icons/editor/H4Icon";
import H5Icon from "@/components/icons/editor/H5Icon";
import H6Icon from "@/components/icons/editor/H6Icon";
import HrIcon from "@/components/icons/editor/HrIcon";
import ImageIcon from "@/components/icons/editor/ImageIcon";
import ItalicIcon from "@/components/icons/editor/ItalicIcon";
import OrderedListIcon from "@/components/icons/editor/OrderedListIcon";
import ParagraphIcon from "@/components/icons/editor/ParagraphIcon";
import UnOrderedListIcon from "@/components/icons/editor/UnOrderedListIcon";
import { EditButtonArgument } from "@/types/editor.interface";
import type { EditButtonArgument } from "@/types/editor.interface";

export const editButtonArgumentList: EditButtonArgument[] = [
{ id: 0, cmd: "justifyCenter", icon: <AlignCenterIcon /> },
Expand Down
2 changes: 1 addition & 1 deletion hooks/useAuthUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import httpClient, { HttpClient } from "@/apis/httpClient";
import fixture from "@/fixture";
import KEY from "@/key";
import Storage from "@/storage";
import { Member } from "@/types/user.interface";
import type { Member } from "@/types/user.interface";
import { useQuery } from "@tanstack/react-query";
import { AxiosError } from "axios";
import { useRouter } from "next/router";
Expand Down
2 changes: 1 addition & 1 deletion hooks/useModal.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import modalState from "@/context/modal";
import { ModalState } from "@/types/modal.interface";
import type { ModalState } from "@/types/modal.interface";
import { useCallback } from "react";
import { useRecoilState } from "recoil";

Expand Down
7 changes: 6 additions & 1 deletion model/artwork/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ import httpClient from "@/apis";
import fixture from "@/fixture";
import useBrowserWidth from "@/hooks/useBrowserWidth";
import KEY from "@/key";
import { Artwork, ArtworkType, Comment, Tag } from "@/types/artwork.interface";
import type {
Artwork,
ArtworkType,
Comment,
Tag,
} from "@/types/artwork.interface";
import { useInfiniteQuery, useQuery } from "@tanstack/react-query";
import { toast } from "react-toastify";

Expand Down
2 changes: 1 addition & 1 deletion model/editor/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import httpClient from "@/apis";
import KEY from "@/key";
import { ShortCut } from "@/types/editor.interface";
import type { ShortCut } from "@/types/editor.interface";
import { useQuery } from "@tanstack/react-query";
import { toast } from "react-toastify";

Expand Down
2 changes: 1 addition & 1 deletion model/oauth/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useQuery } from "@tanstack/react-query";
import httpClient from "@/apis";
import KEY from "@/key";
import { Token } from "@/types/user.interface";
import type { Token } from "@/types/user.interface";
import { toast } from "react-toastify";

const useOauth = (authCode: string) => {
Expand Down
2 changes: 1 addition & 1 deletion model/user/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import httpClient from "@/apis";
import fixture from "@/fixture";
import KEY from "@/key";
import { Member } from "@/types/user.interface";
import type { Member } from "@/types/user.interface";
import { useQuery } from "@tanstack/react-query";
import { toast } from "react-toastify";

Expand Down
2 changes: 1 addition & 1 deletion pages/artwork/[artworkId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import ArtworkComment from "@/components/artwork/ArtworkCommentList";
import ArtworkDetail from "@/components/artwork/ArtworkDetail";
import ArtworkPlayer from "@/components/artwork/ArtworkPlayer";
import ArtworkDetailLayout from "@/layout/ArtworkDetailLayout";
import { Artwork } from "@/types/artwork.interface";
import type { Artwork } from "@/types/artwork.interface";
import { deepcopy } from "@/utils/array";
import { GetStaticProps } from "next";
import Page404 from "../404";
Expand Down
2 changes: 1 addition & 1 deletion pages/editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { editButtonArgumentList } from "@/fixture/property";
import { editorHotkeyRange } from "@/key/editor.index";
import EditorLayout from "@/layout/EditorLayout";
import { useShortCutList } from "@/model/editor";
import { ShortCut } from "@/types/editor.interface";
import type { ShortCut } from "@/types/editor.interface";
import { useEffect, useMemo, useState } from "react";
import { HotkeysProvider, useHotkeys } from "react-hotkeys-hook";

Expand Down
2 changes: 1 addition & 1 deletion types/user.interface.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Artwork } from "./artwork.interface";
import type { Artwork } from "./artwork.interface";

export interface Token {
accessToken: string;
Expand Down

1 comment on commit 4a5d434

@vercel
Copy link

@vercel vercel bot commented on 4a5d434 Apr 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.