Skip to content
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

Merged
merged 23 commits into from
Jul 1, 2023

Conversation

Ubinquitous
Copy link
Member

작업사항

  • 게시판 페이지를 퍼블리싱했습니다.
  • 세팅을 app router로 세팅해놓고 pages 디렉터리명을 사용하면 에러가 나지 않을 줄 알았으나, 충돌이 발생했기에 임시적으로 네이밍을 pages에서 page로 변경했습니다. 추후 회의 진행을 통해 적합한 디렉터리명을 생각해볼 필요가 있습니다.

스크린샷

스크린샷 2023-07-01 오후 5 18 41

@Ubinquitous Ubinquitous requested review from J1min and 5ewon July 1, 2023 08:20
@Ubinquitous Ubinquitous self-assigned this Jul 1, 2023
@Ubinquitous Ubinquitous added the enhancement New feature or request label Jul 1, 2023
Copy link
Member

@5ewon 5ewon left a 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 = ["전체", "불만", "유머", "자유"];
Copy link
Member

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의 프로퍼티로 넣거나 혹은 따로 파일을 분리할 수도 있을 것 같습니다.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filter객체의 프로퍼티로 넣는 방식을 사용한다면 ForumFilter파일의 filters 배열 처럼 따로 재정의해서 사용하면 될 것 같습니다.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

동의합니다~

Copy link
Member Author

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)들을 지정해놓고 개발을 진행하면
훨씬 수월히 개발할 수 있을 것이라 예상됩니다.

Copy link
Member

@J1min J1min left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍👍

@@ -124,6 +124,6 @@ export class HttpClient {
}

export const axiosConfig: HttpClientConfig = {
baseURL: "http://localhost:3000/api",
baseURL: "https://bssm.kro.kr/api",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이건 따로 env로 빼는게 좋아보입니다~~!!

Copy link
Member Author

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 = ["전체", "불만", "유머", "자유"];
Copy link
Member

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) => (
Copy link
Member

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) => (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이것도 마찬가지입니다~

@Ubinquitous
Copy link
Member Author

전부 반영 완료했습니다!

@Ubinquitous Ubinquitous merged commit 15508a7 into main Jul 1, 2023
1 check passed
@5ewon 5ewon self-assigned this Jul 23, 2023
@Ubinquitous Ubinquitous deleted the layouts/forum branch November 27, 2023 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants