Skip to content

[feature] 지원서 제출 후 메시지 개선 및 리다이렉트 처리 추가#592

Merged
oesnuj merged 6 commits intodevelop-fefrom
feature/#591-redirect-after-submit-MOA-116
Jul 27, 2025
Merged

[feature] 지원서 제출 후 메시지 개선 및 리다이렉트 처리 추가#592
oesnuj merged 6 commits intodevelop-fefrom
feature/#591-redirect-after-submit-MOA-116

Conversation

@oesnuj
Copy link
Member

@oesnuj oesnuj commented Jul 27, 2025

#️⃣연관된 이슈

#591

📝작업 내용

이번 PR에서 작업한 내용을 간략히 설명해주세요(이미지/동영상 첨부 가능)

1. 지원서 제출 성공 시 안내 문구 개선

  • "지원 완료", "성공적으로 지원되었습니다" 등의 표현으로 사용자 피드백 강화

2. 제출 성공 후 해당 동아리 상세 페이지(/club/:clubId)로 리다이렉트 처리 추가

3. 제출 실패 시 에러 메시지 개선

  • 네트워크 상태 확인 등 사용자를 고려한 문구로 수정

Summary by CodeRabbit

  • 개선 사항
    • 동아리 지원서 제출 성공 시, 동아리 이름이 포함된 맞춤형 축하 메시지가 표시됩니다.
    • 지원서 제출 성공 후 자동으로 해당 동아리 상세 페이지로 이동하며, 이전 페이지 기록을 대체하여 뒤로 가기 시 불필요한 이동을 방지합니다.
    • 지원 실패 시 경고 이모지와 함께 네트워크 상태 확인 또는 재시도를 안내하는 상세 메시지가 제공됩니다.
    • 동아리 지원 버튼 클릭 시, 이동 기록이 대체되어 사용자 경험이 향상됩니다.

@oesnuj oesnuj requested review from lepitaaar and seongwon030 July 27, 2025 05:09
@oesnuj oesnuj self-assigned this Jul 27, 2025
@oesnuj oesnuj added ✨ Feature 기능 개발 💻 FE Frontend labels Jul 27, 2025
@netlify
Copy link

netlify bot commented Jul 27, 2025

Deploy Preview for moadong ready!

Name Link
🔨 Latest commit 414d529
🔍 Latest deploy log https://app.netlify.com/projects/moadong/deploys/6885d1f6c53ee200089f7028
😎 Deploy Preview https://deploy-preview-592--moadong.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 38
Accessibility: 89
Best Practices: 92
SEO: 92
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 27, 2025

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Invalid regex pattern for base branch. Received: "**" at "reviews.auto_review.base_branches[0]"
⚙️ Configuration instructions
  • 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

"""

Walkthrough

성공적으로 지원서를 제출한 후 표시되는 알림 메시지가 클럽 이름을 포함한 개인화된 메시지로 변경되었으며, 성공 알림 후에는 사용자가 해당 클럽 상세 페이지로 이동하도록 프로그램적으로 리다이렉트가 추가되었습니다. 실패 알림 메시지도 더 구체적으로 수정되었습니다. 또한, 클럽 상세 페이지의 지원하기 버튼 클릭 시 이동 경로의 내비게이션이 히스토리 교체 방식으로 변경되었습니다.

Changes

파일/경로 변경 요약
frontend/src/pages/ApplicationFormPage/ApplicationFormPage.tsx 지원서 제출 성공 시 개인화된 메시지 및 클럽 상세 페이지로 리다이렉트, 실패 시 상세 경고 메시지로 수정
frontend/src/pages/ClubDetailPage/components/ClubApplyButton/ClubApplyButton.tsx 지원하기 버튼 클릭 시 내비게이션 히스토리 교체 옵션({ replace: true }) 추가

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ApplicationFormPage
    participant ClubDetailPage

    User->>ApplicationFormPage: 지원서 제출
    ApplicationFormPage->>ApplicationFormPage: API 호출 및 응답 처리
    alt 성공
        ApplicationFormPage->>User: 클럽명 포함 성공 알림
        ApplicationFormPage->>ClubDetailPage: 페이지 리다이렉트 (replace: true)
    else 실패
        ApplicationFormPage->>User: 네트워크 확인 안내 포함 실패 알림
    end

    User->>ClubDetailPage: 지원하기 버튼 클릭
    ClubDetailPage->>ClubDetailPage: 내비게이션 호출 (replace: true)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • [feature] 동아리 지원하기 기능 #536: 클럽 지원 기능의 핵심 구현을 포함하며, 본 PR은 지원 제출 후 알림 및 리다이렉트, 버튼 내비게이션 동작을 개선하여 해당 기능을 확장함.

Suggested reviewers

  • lepitaaar
  • oesnuj
    """

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d64f0a5 and 0aa3b9b.

📒 Files selected for processing (1)
  • frontend/src/pages/ClubDetailPage/components/ClubApplyButton/ClubApplyButton.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
frontend/**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (frontend/.cursorrules)

frontend/**/*.{ts,tsx}: Replace magic numbers with named constants for clarity.
Replace complex or nested ternary operators with if/else statements or IIFEs for readability.
Assign complex boolean conditions to named variables.
Use consistent return types for similar functions and hooks.
Avoid hidden side effects; functions should only perform actions implied by their signature (Single Responsibility Principle).
Use unique, descriptive names for custom wrappers and functions to avoid ambiguity.
Define constants near related logic or ensure names link them clearly.

Files:

  • frontend/src/pages/ClubDetailPage/components/ClubApplyButton/ClubApplyButton.tsx
frontend/**/*.tsx

📄 CodeRabbit Inference Engine (frontend/.cursorrules)

frontend/**/*.tsx: Abstract complex logic/interactions into dedicated components or higher-order components (HOCs).
Separate significantly different conditional UI/logic into distinct components.
Colocate simple, localized logic or use inline definitions to reduce context switching.
Choose field-level or form-level cohesion based on form requirements.
Break down broad state management into smaller, focused hooks or contexts.
Use component composition instead of props drilling.

Files:

  • frontend/src/pages/ClubDetailPage/components/ClubApplyButton/ClubApplyButton.tsx
🧠 Learnings (2)
📓 Common learnings
Learnt from: lepitaaar
PR: Moadong/moadong#406
File: backend/src/main/java/moadong/club/service/ClubApplyService.java:34-38
Timestamp: 2025-05-19T05:45:52.957Z
Learning: The code duplication between createClubApplication and editClubApplication methods in ClubApplyService.java is acknowledged but will be addressed in a future refactoring, as per the developer's plan.
Learnt from: seongwon030
PR: Moadong/moadong#195
File: frontend/src/pages/AdminPage/AdminPage.tsx:7-7
Timestamp: 2025-03-19T05:18:07.818Z
Learning: AdminPage.tsx에서 현재 하드코딩된 클럽 ID('67d2e3b9b15c136c6acbf20b')는 로그인 기능 구현 후 동적으로 가져오는 방식으로 수정될 예정입니다.
frontend/src/pages/ClubDetailPage/components/ClubApplyButton/ClubApplyButton.tsx (7)

Learnt from: seongwon030
PR: #195
File: frontend/src/pages/AdminPage/AdminPage.tsx:7-7
Timestamp: 2025-03-19T05:18:07.818Z
Learning: AdminPage.tsx에서 현재 하드코딩된 클럽 ID('67d2e3b9b15c136c6acbf20b')는 로그인 기능 구현 후 동적으로 가져오는 방식으로 수정될 예정입니다.

Learnt from: lepitaaar
PR: #406
File: backend/src/main/java/moadong/club/service/ClubApplyService.java:34-38
Timestamp: 2025-05-19T05:45:52.957Z
Learning: The code duplication between createClubApplication and editClubApplication methods in ClubApplyService.java is acknowledged but will be addressed in a future refactoring, as per the developer's plan.

Learnt from: CR
PR: Moadong/moadong#0
File: frontend/.cursorrules:0-0
Timestamp: 2025-07-19T05:09:10.702Z
Learning: Applies to frontend/**/*.tsx : Separate significantly different conditional UI/logic into distinct components.

Learnt from: seongwon030
PR: #548
File: frontend/src/pages/ClubDetailPage/ClubDetailPage.tsx:17-57
Timestamp: 2025-07-19T05:05:10.196Z
Learning: ClubDetailPage.tsx에서 notJoinedClubNames 배열의 하드코딩은 의도적인 설계 결정입니다. 개발자가 명시적으로 하드코딩을 선택했으므로 이에 대한 리팩토링 제안을 하지 않아야 합니다.

Learnt from: CR
PR: Moadong/moadong#0
File: frontend/.cursorrules:0-0
Timestamp: 2025-07-19T05:09:10.702Z
Learning: Applies to frontend/**/*.tsx : Abstract complex logic/interactions into dedicated components or higher-order components (HOCs).

Learnt from: CR
PR: Moadong/moadong#0
File: frontend/.cursorrules:0-0
Timestamp: 2025-07-19T05:09:10.702Z
Learning: Applies to frontend/**/*.tsx : Use component composition instead of props drilling.

Learnt from: CR
PR: Moadong/moadong#0
File: frontend/.cursorrules:0-0
Timestamp: 2025-07-19T05:09:10.702Z
Learning: Applies to frontend/**/*.tsx : Colocate simple, localized logic or use inline definitions to reduce context switching.

🔇 Additional comments (1)
frontend/src/pages/ClubDetailPage/components/ClubApplyButton/ClubApplyButton.tsx (1)

52-52: 사용자 경험을 개선하는 좋은 변경사항입니다.

replace: true 옵션 추가로 지원서 제출 후 뒤로 가기 버튼의 혼란을 방지하고, 클럽 상세 페이지 → 지원서 작성 → 클럽 상세 페이지로의 자연스러운 흐름을 구현했습니다. 브라우저 히스토리 스택이 불필요하게 쌓이는 것도 방지할 수 있어 전반적인 사용성이 향상됩니다.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/#591-redirect-after-submit-MOA-116

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @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.

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.

- 지원서 제출 후 리다이렉트 시 replace: true 적용
- 뒤로가기 시 이전 페이지로 돌아가서 alert가 반복되는 문제 해결
- ClubApplyButton에서 navigate에 replace: true 추가
- 뒤로가기 시 지원모집 마감 alert 반복 노출 방지
Copy link
Member

@seongwon030 seongwon030 left a comment

Choose a reason for hiding this comment

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

리다이렉트 잘 되네요 ㅎㅎ

로컬에서는 모집마감시 뒤로가기 눌러도 alert 안 뜨는데, 넷틀에서만 그러네요..

@oesnuj
Copy link
Member Author

oesnuj commented Jul 27, 2025

리다이렉트 잘 되네요 ㅎㅎ

로컬에서는 모집마감시 뒤로가기 눌러도 alert 안 뜨는데, 넷틀에서만 그러네요..

아까 추가했던 지원 버튼 쪽은 replace: true가 맞는 것 같고, 지원서 제출 후 navigate는 replace 없이 가는 게 더 자연스러운 흐름 같아요!

몇몇은 안 뜨는데, 동아리 돼지는 로컬에서도 지원서 없으면 alert 아직 뜨네요..

@oesnuj oesnuj merged commit e8788f0 into develop-fe Jul 27, 2025
7 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Jul 27, 2025
@oesnuj oesnuj deleted the feature/#591-redirect-after-submit-MOA-116 branch July 28, 2025 06:29
@coderabbitai coderabbitai bot mentioned this pull request Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FE Frontend ✨ Feature 기능 개발

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments