Skip to content

Commit

Permalink
refactor: eslint rule 수정, eslint-ignore-line 삭제, eslint 관련 사용하지 않는 패키…
Browse files Browse the repository at this point in the history
…지 삭제, cypress/storybook 패키지 삭제
  • Loading branch information
anyl92 committed Nov 9, 2024
1 parent fae154e commit c7bc476
Show file tree
Hide file tree
Showing 182 changed files with 4,487 additions and 17,556 deletions.
48 changes: 0 additions & 48 deletions .eslintrc.json

This file was deleted.

22 changes: 0 additions & 22 deletions .storybook/main.ts

This file was deleted.

56 changes: 0 additions & 56 deletions .storybook/preview.tsx

This file was deleted.

4 changes: 3 additions & 1 deletion app/(shared)/(ThemeTextField)/useTextField.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { ChangeEvent, FocusEvent, useEffect, useRef, useState } from "react";

import { ThemeInfoTextFieldType } from "./TextFieldType";

import { useCreateTheme } from "@/components/atoms/createTheme.atom";
import { useCreateHint } from "@/components/atoms/createHint.atom";
import { ThemeInfoTextFieldType } from "./TextFieldType";

const useTextField = ({
id,
Expand Down
4 changes: 3 additions & 1 deletion app/admin-new/(components)/ContentArea.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import React from "react";
import { useModalStateValue } from "@/components/atoms/modals.atom";
import { useSearchParams } from "next/navigation";

import CreateTheme from "./CreateTheme/Container";
import ThemeInfo from "./ThemeInfo/Container";

import { useModalStateValue } from "@/components/atoms/modals.atom";

export default function ContentArea() {
const modals = useModalStateValue();
const searchParams = useSearchParams();
Expand Down
8 changes: 5 additions & 3 deletions app/admin-new/(components)/CreateTheme/Container.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { FormEvent } from "react";

import "../../(style)/createTheme.modules.sass";
import { usePostTheme } from "@/mutations/postTheme";
import { useCreateThemeValue } from "@/components/atoms/createTheme.atom";
import { useSelectedThemeWrite } from "@/components/atoms/selectedTheme.atom";
import CreateThemeTitle from "./CreateThemeTitle";
import CreateThemeBody from "./CreateThemeBody";
import CreateThemeAddButton from "./CreateThemeAddButton";

import { usePostTheme } from "@/mutations/postTheme";
import { useCreateThemeValue } from "@/components/atoms/createTheme.atom";
import { useSelectedThemeWrite } from "@/components/atoms/selectedTheme.atom";

export default function CreateTheme() {
const createTheme = useCreateThemeValue();
const setSelectedTheme = useSelectedThemeWrite();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useCreateThemeValue } from "@/components/atoms/createTheme.atom";
import classNames from "classnames";

import { useCreateThemeValue } from "@/components/atoms/createTheme.atom";

export default function CreateThemeAddButton() {
const createTheme = useCreateThemeValue();
const isDisabled = !(
Expand Down
2 changes: 2 additions & 0 deletions app/admin-new/(components)/CreateTheme/CreateThemeBody.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from "react";

import ThemeTextField from "../../../(shared)/(ThemeTextField)/Container";

import {
hintCountTextFieldProps,
nameTextFieldProps,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from "react";

import { CREATE_THEME_TITLE_TEXT } from "./createTheme";

export default function CreateThemeTitle() {
Expand Down
3 changes: 2 additions & 1 deletion app/admin-new/(components)/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import React from "react";
import Image from "next/image";
import classNames from "classnames";
import { useRouter, useSearchParams } from "next/navigation";

import {
logoProps,
plusDisableProps,
plusProps,
subscribeLinkURL,
} from "@/admin-new/(consts)/sidebar";
import { getSelectedThemeId, getStatus } from "@/utils/localStorage";
import { useRouter, useSearchParams } from "next/navigation";
import { useSelectedThemeReset } from "@/components/atoms/selectedTheme.atom";

interface Theme {
Expand Down
4 changes: 3 additions & 1 deletion app/admin-new/(components)/ThemeDrawer/AddHintDrawer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ThemeTextField from "@/(shared)/(ThemeTextField)/Container";
import Image from "next/image";

import ThemeDrawerAnswer from "./ThemeDrawerAnswer";
import ThemeDrawerHint from "./ThemeDrawerHint";
import {
Expand All @@ -11,6 +11,8 @@ import {
import useAddHint from "./hooks/useAddHint";
import { OnCloseDrawerType } from "./types/themeDrawerTypes";

import ThemeTextField from "@/(shared)/(ThemeTextField)/Container";

const AddHintDrawer = ({ onCloseDrawer }: OnCloseDrawerType) => {
const {
handleSubmit,
Expand Down
6 changes: 4 additions & 2 deletions app/admin-new/(components)/ThemeDrawer/EditHintDrawer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import ThemeTextField from "@/(shared)/(ThemeTextField)/Container";
import Image from "next/image";
import { useSelectedHint } from "@/components/atoms/selectedHint.atom";


import ThemeDrawerAnswer from "./ThemeDrawerAnswer";
import ThemeDrawerHint from "./ThemeDrawerHint";
Expand All @@ -13,6 +12,9 @@ import {
import { OnCloseDrawerType } from "./types/themeDrawerTypes";
import useEditHint from "./hooks/useEditHint";

import { useSelectedHint } from "@/components/atoms/selectedHint.atom";
import ThemeTextField from "@/(shared)/(ThemeTextField)/Container";

const EditHintDrawer = ({ onCloseDrawer }: OnCloseDrawerType) => {
const [selectedHint] = useSelectedHint();
const {
Expand Down
11 changes: 6 additions & 5 deletions app/admin-new/(components)/ThemeDrawer/ThemeDrawerAnswer.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { useSelectedHint } from "@/components/atoms/selectedHint.atom";
import { useCreateHint } from "@/components/atoms/createHint.atom";
import Image from "next/image";
import { useEffect, useRef, useState } from "react";
import { useToastWrite } from "@/components/atoms/toast.atom";
import { getStatus } from "@/utils/localStorage";
import { subscribeLinkURL } from "@/admin-new/(consts)/sidebar";

import { GalleryImageProps } from "./consts/themeDrawerProps";
import { compressImage, convertToPng } from "./helpers/imageHelpers";

import { useSelectedHint } from "@/components/atoms/selectedHint.atom";
import { useToastWrite } from "@/components/atoms/toast.atom";
import { subscribeLinkURL } from "@/admin-new/(consts)/sidebar";
import { useCreateHint } from "@/components/atoms/createHint.atom";
import { getStatus } from "@/utils/localStorage";
const ThemeDrawerAnswer = ({
answerImages,
setAnswerImages,
Expand Down
9 changes: 6 additions & 3 deletions app/admin-new/(components)/ThemeDrawer/ThemeDrawerHint.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import { useSelectedHint } from "@/components/atoms/selectedHint.atom";
import Image from "next/image";
import { useEffect, useRef, useState } from "react";

import { compressImage, convertToPng } from "./helpers/imageHelpers";
import { GalleryImageProps } from "./consts/themeDrawerProps";

import { useSelectedHint } from "@/components/atoms/selectedHint.atom";
import { useToastWrite } from "@/components/atoms/toast.atom";
import { useCreateHint } from "@/components/atoms/createHint.atom";
import { getStatus } from "@/utils/localStorage";
import { subscribeLinkURL } from "@/admin-new/(consts)/sidebar";
import { compressImage, convertToPng } from "./helpers/imageHelpers";
import { GalleryImageProps } from "./consts/themeDrawerProps";


const ThemeDrawerHint = ({
hintImages,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { ThemeInfoTextFieldType } from "@/(shared)/(ThemeTextField)/TextFieldType";
import {
codeValidations,
progressValidations,
} from "../helpers/textFieldHelpers";

import { ThemeInfoTextFieldType } from "@/(shared)/(ThemeTextField)/TextFieldType";

export const codeTextFieldProps: ThemeInfoTextFieldType = {
id: "hintCode",
tabIndex: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const convertToPng = async (file: File): Promise<File> =>
reader.readAsDataURL(file);

// 이미지가 로드되면 Canvas에 그려서 PNG로 변환
// eslint-disable-next-line consistent-return
img.onload = () => {
const canvas = document.createElement("canvas");
const ctx = canvas.getContext("2d");
Expand Down
4 changes: 3 additions & 1 deletion app/admin-new/(components)/ThemeDrawer/hooks/useAddHint.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { useRef, useState, FormEvent } from "react";

import { OnCloseDrawerType } from "../types/themeDrawerTypes";

import HintDialog from "@/components/common/Hint-Dialog-new/Dialog";
import { useSelectedThemeValue } from "@/components/atoms/selectedTheme.atom";
import { useCreateHint } from "@/components/atoms/createHint.atom";
import useClickOutside from "@/hooks/useClickOutside";
import useHintUpload from "@/queries/getPreSignedUrl";
import useModal from "@/hooks/useModal";
import { OnCloseDrawerType } from "../types/themeDrawerTypes";

const useAddHint = ({ onCloseDrawer }: OnCloseDrawerType) => {
const selectedTheme = useSelectedThemeValue();
Expand Down
4 changes: 3 additions & 1 deletion app/admin-new/(components)/ThemeDrawer/hooks/useEditHint.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { useState, useEffect, FormEvent, useRef } from "react";

import { OnCloseDrawerType } from "../types/themeDrawerTypes";

import HintDialog from "@/components/common/Hint-Dialog-new/Dialog";
import { useSelectedHint } from "@/components/atoms/selectedHint.atom";
import { useSelectedThemeValue } from "@/components/atoms/selectedTheme.atom";
Expand All @@ -7,7 +10,6 @@ import useClickOutside from "@/hooks/useClickOutside";
import useHintUpload from "@/queries/getPreSignedUrl";
import useModal from "@/hooks/useModal";
import extractFilename from "@/utils/helper";
import { OnCloseDrawerType } from "../types/themeDrawerTypes";
// import cloneDeep from "lodash/cloneDeep";

const useEditHint = ({ onCloseDrawer }: OnCloseDrawerType) => {
Expand Down
14 changes: 9 additions & 5 deletions app/admin-new/(components)/ThemeInfo/Container.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import React, { useEffect, useState } from "react";

import "../../(style)/themeInfo.modules.sass";
import useModal from "@/hooks/useModal";
import Dialog from "@/components/common/Dialog-new/Dialog";
import { useSelectedHintReset } from "@/components/atoms/selectedHint.atom";
import AddHintDrawer from "../ThemeDrawer/AddHintDrawer";
import EditHintDrawer from "../ThemeDrawer/EditHintDrawer";

import ThemeInfoTitle from "./ThemeInfoTitle";
import ThemeInfoBody from "./ThemeInfoBody";
import ThemeInfoHint from "./ThemeInfoHint";
import AddHintDrawer from "../ThemeDrawer/AddHintDrawer";
import EditHintDrawer from "../ThemeDrawer/EditHintDrawer";

import useModal from "@/hooks/useModal";
import Dialog from "@/components/common/Dialog-new/Dialog";
import { useSelectedHintReset } from "@/components/atoms/selectedHint.atom";


export default function ThemeInfo() {
const { open } = useModal();
Expand Down
3 changes: 2 additions & 1 deletion app/admin-new/(components)/ThemeInfo/ThemeInfoBody.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useSelectedThemeValue } from "@/components/atoms/selectedTheme.atom";
import React from "react";

import { useSelectedThemeValue } from "@/components/atoms/selectedTheme.atom";

interface Props {
handleOpenModal: () => void;
}
Expand Down
3 changes: 2 additions & 1 deletion app/admin-new/(components)/ThemeInfo/ThemeInfoHint.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import React from "react";
import classNames from "classnames";

import { useGetHintList } from "@/queries/getHintList";
import { useSelectedThemeValue } from "@/components/atoms/selectedTheme.atom";
import {
Expand All @@ -7,7 +9,6 @@ import {
useSelectedHintReset,
} from "@/components/atoms/selectedHint.atom";
import { useCreateHintReset } from "@/components/atoms/createHint.atom";
import classNames from "classnames";

interface ThemeDrawerProps {
handleHintCreate: (type: string) => void;
Expand Down
3 changes: 2 additions & 1 deletion app/admin-new/(components)/ThemeInfo/ThemeInfoTitle.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useSelectedThemeValue } from "@/components/atoms/selectedTheme.atom";
import React from "react";

import { useSelectedThemeValue } from "@/components/atoms/selectedTheme.atom";

interface Props {
handleOpenModal: () => void;
}
Expand Down
Loading

0 comments on commit c7bc476

Please sign in to comment.