Skip to content

fix(fe): disable access to problem create page#3596

Open
sONg20NOW wants to merge 3 commits into
mainfrom
t2727-disable-access-to-problem-create-page
Open

fix(fe): disable access to problem create page#3596
sONg20NOW wants to merge 3 commits into
mainfrom
t2727-disable-access-to-problem-create-page

Conversation

@sONg20NOW
Copy link
Copy Markdown
Contributor

Description

대회 전에 완성되지 않은 problem/create 경로에 대한 사용자 접근을 막습니다.

Additional context

메인페이지의 문제 생성 바로가기 버튼을 숨김 처리 했습니다.

closes TAS-2727


Before submitting the PR, please make sure you do the following

@sONg20NOW sONg20NOW requested review from hjkim24, ojongii and zero1177 May 28, 2026 02:18
@sONg20NOW sONg20NOW self-assigned this May 28, 2026
@sONg20NOW sONg20NOW added ⛳️ team-frontend 🍊squad-유자차 스쿼드 유자차 작업물입니다 preview 이 라벨이 붙어있어야 프론트엔드 Preview 환경이 생성됩니다 labels May 28, 2026
@github-project-automation github-project-automation Bot moved this to Pending ✋ in Codedang May 28, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request modifies the MiddleBanner component by removing the 'use client' directive, commenting out the unused Link import, and replacing the active "Create Problem" button with a disabled, invisible dummy button (opacity-0) and commented-out code. The reviewer recommends removing the unnecessary dummy button and commented-out code to keep the codebase clean. Additionally, the reviewer highlights a critical security/UX concern: simply hiding or disabling the button on the UI does not prevent users from directly navigating to the /problem/create route, so proper route protection (such as a redirect or notFound()) should be implemented on the page level.

Comment on lines +29 to 36
<Button
disabled
className="bg-color-common-100 hover:bg-color-neutral-99 hidden h-12 w-fit rounded-full px-6 py-3 opacity-0 md:flex"
>
<span className="text-sub3_sb_16 text-color-common-0">
문제 생성 바로가기
</span>
</Button>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

1. 불필요한 더미 버튼 제거

레이아웃 유지를 위해 opacity-0 속성을 가진 더미 버튼을 추가하셨습니다. 하지만 부모 컨테이너가 flex-col justify-center 구조이므로, 버튼이 없어도 텍스트가 세로 중앙에 자연스럽게 정렬됩니다. 불필요한 더미 엘리먼트는 렌더링 성능과 코드 가독성에 좋지 않으므로 제거하는 것을 권장합니다.

또한, 위쪽에 주석 처리된 <Button><Link> 코드 블록도 Git 이력을 통해 언제든지 복구할 수 있으므로 주석으로 남겨두기보다는 완전히 삭제하는 것이 깔끔합니다.

2. 실제 페이지 접근 제어 필요 (중요)

메인 페이지에서 버튼을 숨기거나 비활성화하는 것만으로는 사용자가 /problem/create 경로로 직접 접속하는 것을 막을 수 없습니다. PR의 목적인 **"완성되지 않은 경로에 대한 사용자 접근 제한"**을 확실히 달성하려면, 해당 페이지 컴포넌트(apps/frontend/app/(client)/(main)/(create)/problem/create/page.tsx) 내부에서 Next.js의 notFound()를 호출하거나 메인 페이지로 리다이렉트(redirect('/'))하는 로직을 추가해야 합니다.

import { Button } from '@/components/shadcn/button'
import Link from 'next/link'

// import Link from 'next/link'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

사용하지 않는 Link 컴포넌트의 임포트 문이 주석 처리되어 남아있습니다. 코드의 깔끔함과 유지보수성을 위해 주석 처리된 코드는 남겨두지 않고 완전히 삭제하는 것이 좋습니다.

@skkuding-bot
Copy link
Copy Markdown

skkuding-bot Bot commented May 28, 2026

Syncing Preview App Succeeded

Application: frontend
Revision: 9c6d107ef68dda0d030a08001a74cc53239a1b87
Health Status: Healthy

Open Preview | View in Argo CD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview 이 라벨이 붙어있어야 프론트엔드 Preview 환경이 생성됩니다 🍊squad-유자차 스쿼드 유자차 작업물입니다 ⛳️ team-frontend

Projects

Status: Pending ✋

Development

Successfully merging this pull request may close these issues.

1 participant