Skip to content

Commit

Permalink
refactor: 파일구조 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeSG98 committed Jun 14, 2024
1 parent ad48238 commit aacc862
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from "react";
import styles from "./Notification.module.scss";
import type { Notification } from "../types/types";
import type { Notification } from "../types/NotificationModal.types";
import useCookie from "@/hooks/useCookies";
import { useClearNotification } from "../hooks/useUserQuery";
import { useClearNotification } from "../../../hooks/useNotiUserQuery";

export default function Notification({
alertId,
Expand Down
6 changes: 3 additions & 3 deletions components/NotificationModal/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from "react";
import styles from "./NotificationModal.module.scss";
import Image from "next/image";
import Notification from "./components/Notification";
import extractNotificationInfo from "./utils/extractNotificationInfo";
import { NotificationItem } from "./types/types";
import Notification from "./Notification";
import extractNotificationInfo from "../../utils/extractNotificationInfo";
import { NotificationItem } from "./types/NotificationModal.types";
import closeIcon from "@/public/image/close_icon.svg";

interface NotificationModalProps {
Expand Down
File renamed without changes.
8 changes: 6 additions & 2 deletions components/Signup/SignupForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ import Button from "@/components/Button";
import Input from "@/components/Input";
import UserTypeSelect from "../UserTypeSelect";
import styles from "./SignupForm.module.scss";
import { INVALID_EMAIL, INVALID_PASSWORD } from "../../Signin/ErrorMessage/errorMessage";
import {
INVALID_EMAIL,
INVALID_PASSWORD,
} from "../../Signin/ErrorMessage/errorMessage";
import { useRouter } from "next/router";
import { emailRegex, passwordRegex } from "@/utils/signupRegex";
import { BASE_URL } from "@/constants/constants";
Expand Down Expand Up @@ -85,7 +88,8 @@ export default function SignupForm() {
type="password"
register={register("passwordCheck", {
required: "비밀번호를 다시 입력하세요.",
validate: (value) => value === getValues("password") || "비밀번호가 일치하지 않습니다.",
validate: (value) =>
value === getValues("password") || "비밀번호가 일치하지 않습니다.",
})}
/>
<UserTypeSelect type={type} setType={setType} />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useMutation } from "react-query";
import { ClearNotification } from "./userRequest";
import { ClearNotification } from "./userNotiRequest";

export function useClearNotification(id: string, alertId: string, jwt: string) {
return useMutation(() => ClearNotification(id, alertId, jwt));
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import getElapsedTime from "./getElapsedTime";
import { NotificationItem } from "../types/types";
import { NotificationItem } from "../components/NotificationModal/types/NotificationModal.types";
import formatTimeRange from "./formatTimeRange";

export default function extractNotificationInfo(
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit aacc862

Please sign in to comment.