Skip to content

Commit 8a70f66

Browse files
authored
Merge pull request #250 from Feed-B/dev
[배포] 배포
2 parents 3b4c1fc + b67f780 commit 8a70f66

File tree

29 files changed

+28873
-4460
lines changed

29 files changed

+28873
-4460
lines changed

.eslintrc.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,19 @@
55
"node": true
66
},
77
"parser": "@typescript-eslint/parser",
8-
"extends": ["eslint:recommended", "next/core-web-vitals", "plugin:@typescript-eslint/recommended"],
9-
8+
"extends": [
9+
"eslint:recommended",
10+
"next/core-web-vitals",
11+
"plugin:@typescript-eslint/recommended",
12+
"plugin:storybook/recommended"
13+
],
1014
"parserOptions": {
1115
"ecmaVersion": "latest",
1216
"sourceType": "module",
1317
"requireConfigFile": false
1418
},
1519
"plugins": ["react", "@typescript-eslint", "import"],
16-
20+
"ignorePatterns": ["!**/.storybook/*"],
1721
"rules": {
1822
"import/order": [
1923
"error",
@@ -31,6 +35,7 @@
3135
"react-hooks/rules-of-hooks": "error",
3236
"react-hooks/exhaustive-deps": "warn",
3337
"array-callback-return": 0,
34-
"react/self-closing-comp": "warn"
38+
"react/self-closing-comp": "warn",
39+
"react/no-unescaped-entities": "off"
3540
}
3641
}

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,9 @@ yarn-error.log*
3636
next-env.d.ts
3737

3838
.env
39-
.eslintcache
39+
.eslintcache
40+
*storybook.log
41+
42+
test.json
43+
test.json.html
44+

.storybook/main.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import type { StorybookConfig } from "@storybook/nextjs";
2+
3+
const config: StorybookConfig = {
4+
stories: ["../stories/**/*.mdx", "../stories/**/*.stories.@(js|jsx|mjs|ts|tsx|mdx)"],
5+
addons: [
6+
"@storybook/addon-onboarding",
7+
"@storybook/addon-links",
8+
"@storybook/addon-docs",
9+
"@storybook/addon-essentials",
10+
"@chromatic-com/storybook",
11+
"@storybook/addon-interactions",
12+
],
13+
framework: {
14+
name: "@storybook/nextjs",
15+
options: {},
16+
},
17+
staticDirs: ["../public"],
18+
};
19+
export default config;

.storybook/preview.tsx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import React, { useEffect } from "react";
2+
import type { Preview } from "@storybook/react";
3+
import "../app/_styles/globals.css";
4+
5+
// 전역 decorator 추가
6+
const WithModalRoot = (Story: React.ComponentType) => {
7+
useEffect(() => {
8+
// 'modal-root'가 존재하지 않으면 생성
9+
if (!document.getElementById("modal")) {
10+
const modalRoot = document.createElement("div");
11+
modalRoot.setAttribute("id", "modal");
12+
document.body.appendChild(modalRoot);
13+
}
14+
}, []);
15+
16+
return <Story />;
17+
};
18+
19+
const preview: Preview = {
20+
parameters: {
21+
controls: {
22+
matchers: {
23+
color: /(background|color)$/i,
24+
date: /Date$/i,
25+
},
26+
},
27+
},
28+
decorators: [WithModalRoot], // Decorator를 추가하여 모든 스토리에 적용
29+
};
30+
31+
export default preview;

app/_apis/httpClient.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ function httpClient() {
88
next: {
99
tags: [...tags],
1010
},
11+
cache: "no-store",
1112
});
1213
const result: R = await response.json();
1314
return result;

app/_components/Button/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { ButtonHTMLAttributes, PropsWithChildren } from "react";
44
import { twMerge } from "tailwind-merge";
55

6-
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, PropsWithChildren {
6+
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, PropsWithChildren {
77
buttonSize: ButtonSize;
88
bgColor: BgColor;
99
}

app/_components/Input/Input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { ChangeEventHandler, InputHTMLAttributes } from "react";
22
import { twMerge } from "tailwind-merge";
33
import { UseFormRegisterReturn, FieldError } from "react-hook-form";
44

5-
interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
5+
export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
66
title?: string;
77
inputSize: InputSize;
88
register?: UseFormRegisterReturn;

app/_components/Modal/Modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function Modal({ children, openModal, handleModalClose, className }: ModalProps)
2222

2323
return (
2424
<ModalPortal>
25-
<div className="fixed left-0 top-0 z-50 h-full w-full bg-black-overlay" onClick={handleModalClose}>
25+
<div role="dialog" className="fixed left-0 top-0 z-50 h-full w-full bg-black-overlay" onClick={handleModalClose}>
2626
<div onClick={event => event.stopPropagation()} className={`${modalClass} ${openModal ? open : ""}`}>
2727
<Image
2828
src={closeIcon}

app/main/page.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ import React from "react";
22
import { cookies } from "next/headers";
33
import { dehydrate, HydrationBoundary } from "@tanstack/react-query";
44
import getQueryClient from "../_utils/getQueryClient";
5-
import { revalidateTagAction } from "../_utils/revalidationAction";
65
import { usePrefetchProjectList } from "../_hooks/reactQuery/useProjectQuery";
76
import SelectStack from "./_components/SelectStack/SelectStack";
87

9-
async function MainPage() {
10-
revalidateTagAction("pojectList");
8+
function MainPage() {
119
const queryClient = getQueryClient();
1210
const cookieStore = cookies();
1311
const ACCESS_TOKEN = cookieStore.get("ACCESS_TOKEN");

app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import AnimationSection from "./_components/LandingPage/AnimationSection";
1212
import { usePrefetchProjectList } from "./_hooks/reactQuery/useProjectQuery";
1313
import getQueryClient from "./_utils/getQueryClient";
1414

15-
export default async function Home() {
15+
export default function Home() {
1616
const queryClient = getQueryClient();
1717
usePrefetchProjectList(queryClient, { page: 1, size: 12, sortCondition: "LIKES" });
1818

0 commit comments

Comments
 (0)