Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions src/404.tsx

This file was deleted.

26 changes: 26 additions & 0 deletions src/pages/notFound/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { useNavigate } from "react-router-dom";
import Button from "@/components/button";
import styled from "styled-components";

const NotFound = () => {
const router = useNavigate();
return (
<Container>
<h1>404 Not Found</h1>
<Button width="100" onClick={() => router("/main")}>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Button의 width 속성값을 확인해주세요.

width="100"에서 단위가 명시되지 않았습니다. Button 컴포넌트의 API에 따라 "100%" 또는 "100px" 등의 명시적인 단위가 필요할 수 있습니다.

다음 스크립트를 실행하여 Button 컴포넌트의 width prop 타입을 확인하세요:


🏁 Script executed:

#!/bin/bash
# Description: Button 컴포넌트의 width prop 타입 정의 확인

# Button 컴포넌트 파일 찾기 및 props 타입 확인
fd -e tsx -e ts "button" src/components | xargs cat | rg -A 10 -B 2 "width"

Length of output: 2690


Button 컴포넌트의 width prop에 CSS 단위 명시 필요

Button 컴포넌트의 width prop은 string 타입으로 정의되어 있으며, 이 값이 styled-components를 통해 CSS width 속성으로 직접 적용됩니다. CSS는 0이 아닌 길이 값에 단위를 요구하므로, width="100"은 유효하지 않은 CSS입니다.

스토리의 예시에서 확인할 수 있듯이 width: "100px"처럼 명시적인 단위를 포함해야 합니다. 현재 코드를 width="100px" 또는 width="100%" 등으로 수정하세요.

🤖 Prompt for AI Agents
In src/pages/notFound/index.tsx around line 10, the Button is passed width="100"
which lacks CSS units; update the prop to include units such as width="100px" or
width="100%" so the styled-component receives a valid CSS length string (e.g.,
change width="100" to width="100px").

메인으로 가기
</Button>
</Container>
);
};

export default NotFound;

const Container = styled.div`
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
gap: 16px;
`;
2 changes: 1 addition & 1 deletion src/router/router.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NotFound } from "@/404";
import NotFound from "@/pages/notFound";
import Attendance from "@/pages/attendance";
import Bug from "@/pages/bug";
import Login from "@/pages/login";
Expand Down