Skip to content

Commit dc39ca4

Browse files
authored
Merge branch 'main' into refactor/meister
2 parents 76cc140 + 16f86e3 commit dc39ca4

File tree

155 files changed

+2665
-2486
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+2665
-2486
lines changed

src/apis/httpClient/httpClient.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import axios, { AxiosInstance, AxiosRequestConfig } from "axios";
22
import { requestInterceptors, responseInterceptors } from "@/apis/interceptor";
3-
import { ERROR } from "@/constants";
4-
import { TOKEN } from "@/storage/constants";
3+
import ERROR from "@/constants/error.constant";
4+
import { TOKEN } from "@/storage/constants/";
55
import Storage from "../../storage";
66
import { refresh } from "../token";
77

@@ -165,21 +165,21 @@ export const axiosConfig: HttpClientConfig = {
165165
};
166166

167167
export default {
168-
oauth: new HttpClient("api/auth/oauth/bsm", axiosConfig),
169-
user: new HttpClient("api/user", axiosConfig),
170-
timetable: new HttpClient("api/timeTable", axiosConfig),
171-
post: new HttpClient("api/post/", axiosConfig),
172-
recomment: new HttpClient("api/recomment", axiosConfig),
173-
comment: new HttpClient("api/comment", axiosConfig),
174-
auth: new HttpClient("api/auth/", axiosConfig),
175-
bamboo: new HttpClient("api/bamboo", axiosConfig),
176-
admin: new HttpClient("api/bamboo/admin", axiosConfig),
177-
like: new HttpClient("api/likes/update", axiosConfig),
178-
image: new HttpClient("api/image/save", axiosConfig),
179-
meal: new HttpClient("api/meal", axiosConfig),
180-
calendar: new HttpClient("api/calender", axiosConfig),
181-
ber: new HttpClient("api/ber", axiosConfig),
182-
meister: new HttpClient("api/meister", axiosConfig),
183-
ranking: new HttpClient("api/meister/ranking", axiosConfig),
184-
main: new HttpClient("api/main", axiosConfig),
168+
oauth: new HttpClient("/api/auth/oauth/bsm", axiosConfig),
169+
user: new HttpClient("/api/user", axiosConfig),
170+
timetable: new HttpClient("/api/timeTable", axiosConfig),
171+
post: new HttpClient("/api/post/", axiosConfig),
172+
recomment: new HttpClient("/api/recomment", axiosConfig),
173+
comment: new HttpClient("/api/comment", axiosConfig),
174+
auth: new HttpClient("/api/auth/", axiosConfig),
175+
bamboo: new HttpClient("/api/bamboo", axiosConfig),
176+
admin: new HttpClient("/api/bamboo/admin", axiosConfig),
177+
like: new HttpClient("/api/likes/update", axiosConfig),
178+
image: new HttpClient("/api/image/save", axiosConfig),
179+
meal: new HttpClient("/api/meal", axiosConfig),
180+
calendar: new HttpClient("/api/calender", axiosConfig),
181+
ber: new HttpClient("/api/ber", axiosConfig),
182+
meister: new HttpClient("/api/meister", axiosConfig),
183+
ranking: new HttpClient("/api/meister/ranking", axiosConfig),
184+
main: new HttpClient("/api/main", axiosConfig),
185185
};

src/app/not-found.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { PageNotFound } from "@/assets/images";
44
import { Button } from "@/components/atoms";
5-
import { ROUTER } from "@/constants";
5+
import ROUTER from "@/constants/router.constant";
66
import { color, flex } from "@/styles";
77
import Image from "next/image";
88
import { useRouter } from "next/navigation";
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client";
22

3-
import UpdatePage from "@/templates/forum-edit";
3+
import PostEditPage from "@/templates/post/layouts/edit";
44

55
interface IPostUpdateAppPageParams {
66
params: {
@@ -9,7 +9,7 @@ interface IPostUpdateAppPageParams {
99
}
1010

1111
const Update = ({ params }: IPostUpdateAppPageParams) => {
12-
return <UpdatePage {...params} />;
12+
return <PostEditPage {...params} />;
1313
};
1414

1515
export default Update;

src/app/post/[id]/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
"use client";
22

3-
import PostPage from "@/templates/forum-post";
3+
import PostDetailPage from "@/templates/post/layouts/detail";
44

55
interface IPostAppPageParams {
66
params: {
77
id: number;
88
};
99
}
1010

11-
const Post = ({ params }: IPostAppPageParams) => {
12-
return <PostPage {...params} />;
11+
const PostDetail = ({ params }: IPostAppPageParams) => {
12+
return <PostDetailPage {...params} />;
1313
};
1414

15-
export default Post;
15+
export default PostDetail;

src/app/post/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client";
22

3-
import PostPage from "@/templates/post/layouts";
3+
import PostPage from "@/templates/post/layouts/list";
44

55
const Post = () => {
66
return <PostPage />;

src/app/post/write/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"use client";
22

3-
import WritePage from "@/templates/forum-write";
3+
import PostWritePage from "@/templates/post/layouts/write";
44

55
const Write = () => {
6-
return <WritePage />;
6+
return <PostWritePage />;
77
};
88

99
export default Write;

src/assets/data/emptyInputPost.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/assets/icons/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
export { default as Arrow } from "./Arrow";
21
export { default as CategoryArrow } from "./CategoryArrow";
32
export { default as Check } from "./Check";
43
export { default as Emoji } from "./Emoji";
@@ -15,7 +14,6 @@ export { default as Relaxed } from "./emojis/Relaxed";
1514
export { default as Curve } from "./Curve";
1615
export { default as HistorySeparator } from "./HistorySeparator";
1716
export { default as UploadIcon } from "./UploadIcon";
18-
export { default as AddCommentIcon } from "./AddCommentIcon";
1917
export { default as DesktopIcon } from "./DesktopIcon";
2018
export { default as MealIcon } from "./MealIcon";
2119
export { default as BerIcon } from "./BerIcon";

src/components/atoms/Button.tsx

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,57 @@
1-
import styled from "styled-components";
1+
import styled, { css } from "styled-components";
22
import { color, font } from "@/styles";
33

4-
interface IButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
55
color: string;
6+
align?: "TOP" | "RIGHT" | "BOTTOM" | "LEFT";
7+
isSmall?: boolean;
68
}
79

8-
const Button = ({ ...props }: IButtonProps) => {
10+
const Button = ({ ...props }: ButtonProps) => {
911
return <StyledButton {...props} />;
1012
};
1113

12-
const StyledButton = styled.button<{ color: string }>`
14+
const StyledButton = styled.button<{
15+
color: string;
16+
align?: string;
17+
isSmall?: boolean;
18+
}>`
1319
width: fit-content;
14-
padding: 4px 16px;
1520
border-radius: 4px;
1621
background-color: ${(props) => props.color};
1722
color: ${color.white};
18-
${font.btn3};
23+
${({ isSmall }) =>
24+
isSmall
25+
? css`
26+
padding: 3px 10px;
27+
${font.caption};
28+
`
29+
: css`
30+
padding: 4px 16px;
31+
${font.btn3};
32+
`};
33+
${({ align }) => {
34+
switch (align) {
35+
case "TOP":
36+
return css`
37+
margin-bottom: auto;
38+
`;
39+
case "RIGHT":
40+
return css`
41+
margin-left: auto;
42+
`;
43+
case "BOTTOM":
44+
return css`
45+
margin-top: auto;
46+
`;
47+
case "LEFT":
48+
return css`
49+
margin-right: auto;
50+
`;
51+
default:
52+
return "";
53+
}
54+
}}
1955
`;
2056

2157
export default Button;

src/components/atoms/CustomEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ interface ICustomEditorProps extends CustomEditorPropsType {
2323
const CustomEditor = ({ ...props }: ICustomEditorProps) => {
2424
const { openModal, closeModal } = useModal();
2525

26-
const handleImageSelected = async (file: File | undefined) => {
26+
const handleImageSelected = async (file?: File) => {
2727
closeModal();
2828
const imageUrl = await getImageUrl(file);
2929

0 commit comments

Comments
 (0)