Skip to content

[UNI-296] feat : 404 페이지 제작 및 오류 발생 시 돌아가는 버튼 추가#176

Merged
dgfh0450 merged 1 commit intofefrom
feat/UNI-296
Feb 18, 2025
Merged

[UNI-296] feat : 404 페이지 제작 및 오류 발생 시 돌아가는 버튼 추가#176
dgfh0450 merged 1 commit intofefrom
feat/UNI-296

Conversation

@jpark0506
Copy link
Copy Markdown
Contributor

📝 PR 타입

  • 기능 구현
  • 기능 수정
  • 버그 수정
  • 리팩토링
  • 인프라, 의존성, 환경 변수, 빌드 관련 코드 업데이트

🚀 변경 사항

접근할 수 없는 경로에 피드백이 필요할 것으로 보여, 404 페이지를 추가하고, 오류가 발생했을때도 돌아갈 수 있도록 하였습니다.

돌아가는 버튼을 눌렀을 때 로직을 분리

	const handleGoBack = () => {
		if (window.history.length > 1) {
			navigate(-1);
		} else {
			navigate("/");
		}
	};

동현님 말대로, 사용자가 뒤로가기를 제스처로 고려하는 경우도 있고, 오류가 발생해도 바로 뒤로 가는 것이 자연스럽다고 느껴져 해당 로직을 반영했습니다.
다만, 사용자가 변형된 링크(카카오톡 공유 etc..)로 바로 접속했을 경우도 대비를 해야하기 때문에, history 객체를 사용해 구분했습니다.

버튼 children에도 차이점을 뒀습니다.

<div onClick={handleGoBack} className="absolute bottom-6 space-y-2 w-full px-4">
          <Button variant="primary">{window.history.length > 1 ? "뒤로 가기" : "홈으로 이동"}</Button>
</div>

💡 To Reviewer

감사합니다.

🧪 테스트 결과

History 존재시

2025-02-18.11.47.22.mov

History 존재하지 않을 시

2025-02-18.11.48.13.mov

✅ 반영 브랜치

fe

하위 이슈

UNI-298, UNI-299

@jpark0506 jpark0506 added 🚀 feat 기능 개발 🧇 fe 프론트엔드 task labels Feb 18, 2025
@jpark0506 jpark0506 requested a review from dgfh0450 February 18, 2025 02:50
@jpark0506 jpark0506 self-assigned this Feb 18, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 18, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@dgfh0450 dgfh0450 left a comment

Choose a reason for hiding this comment

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

LGTM! 디테일 챙겨주셔서 감사합니다

@dgfh0450 dgfh0450 merged commit d3edae2 into fe Feb 18, 2025
@jpark0506 jpark0506 deleted the feat/UNI-296 branch February 19, 2025 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧇 fe 프론트엔드 task 🚀 feat 기능 개발

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants