-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
게시판 퍼블리싱, pages 디렉터리명 변경 #22
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍👍
import React from "react"; | ||
import styled, { css } from "styled-components"; | ||
|
||
const categories = ["전체", "불만", "유머", "자유"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
categories 배열도 constant로 따로 빼는건 어떨까요?
utils/contants/filter의 프로퍼티로 넣거나 혹은 따로 파일을 분리할 수도 있을 것 같습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filter객체의 프로퍼티로 넣는 방식을 사용한다면 ForumFilter파일의 filters 배열 처럼 따로 재정의해서 사용하면 될 것 같습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
동의합니다~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
말씀하신대로 filter라는 constant의 이름을 조금 더 넓은 도메인을
포괄하는 이름으로 변경하기 위해 forum이라는 키워드를 사용했으며,
forum 내에 category 라는 객체로 constant를 지정해주었습니다.
constant를 많이 사용했을 때 코드가 길어질 수 있는데,
이에 대해 경험이 부족하여 어떤 문제점이 있으며 이와 관련된 constant
사용법이 올바른 것인지 헷갈립니다.
확실히 기존에 사용하지 않던 방식으로 디렉터리를 구조화시키고 컴포넌트를
짜며 개발해보니 러닝 커브가 심해 작업속도가 느려지는 부면이 있습니다.
따로 회의를 통해 여러가지 사안(주로 constant)들을 지정해놓고 개발을 진행하면
훨씬 수월히 개발할 수 있을 것이라 예상됩니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍👍
src/apis/httpClient/index.ts
Outdated
@@ -124,6 +124,6 @@ export class HttpClient { | |||
} | |||
|
|||
export const axiosConfig: HttpClientConfig = { | |||
baseURL: "http://localhost:3000/api", | |||
baseURL: "https://bssm.kro.kr/api", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이건 따로 env로 빼는게 좋아보입니다~~!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
작업 완료했습니다!
import React from "react"; | ||
import styled, { css } from "styled-components"; | ||
|
||
const categories = ["전체", "불만", "유머", "자유"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
동의합니다~
|
||
return ( | ||
<Row gap="6px"> | ||
{categories.map((tag) => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
배열 이름이 categories이니, 반복되는 변수 이름도 category가 더 좋아보입니다~
|
||
return ( | ||
<Row gap="14px" alignItems="center"> | ||
{filters.map((item) => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이것도 마찬가지입니다~
전부 반영 완료했습니다! |
작업사항
스크린샷