Skip to content

Conversation

@ff1451
Copy link
Collaborator

@ff1451 ff1451 commented Dec 15, 2025

No description provided.

@ff1451 ff1451 self-assigned this Dec 15, 2025
@ff1451 ff1451 linked an issue Dec 15, 2025 that may be closed by this pull request
@ff1451 ff1451 requested a review from Copilot December 15, 2025 05:01
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the signup logic by improving field naming, adding explicit agreement fields for terms and privacy, and simplifying the routing structure. The changes replace the generic "school" concept with "university" throughout the codebase for clarity, and consolidate the signup flow by removing nested routes.

Key Changes

  • Renamed signup state fields to be more explicit: marketingisMarketingAgreement, schooluniversityId, and added isTermsAgreement and isPrivacyAgreement fields
  • Refactored SchoolStep into UniversityStep with improved search functionality and removed the custom input option
  • Flattened signup route structure from /signup/profile/school to /signup/university for simpler navigation

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/stores/signupStore.ts Updated state interface with explicit agreement fields and renamed school to universityId
src/pages/SignUp/UniversityStep.tsx New component replacing SchoolStep with search-based university selection
src/pages/SignUp/TermStep.tsx Updated to persist all three agreement states to store and navigate to flattened route
src/pages/SignUp/StudentIdStep.tsx Updated to use flattened navigation path
src/pages/SignUp/SchoolStep.tsx Removed file replaced by UniversityStep
src/pages/SignUp/NameStep.tsx Updated to use universityId and isMarketingAgreement in API call
src/apis/auth/entity.ts Updated SignupRequest interface to match new field names
src/App.tsx Simplified routing structure by removing nested profile routes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

import StepLayout from './components/StepLayout';
import { useGetUniversityList } from './hooks/useUniversity';

function SchoolCard({ label, onClick }: { label: string; onClick: () => void }) {
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

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

The component name 'SchoolCard' is inconsistent with the file and feature naming. Since this file is now 'UniversityStep' and deals with universities, the component should be renamed to 'UniversityCard' for consistency.

Copilot uses AI. Check for mistakes.
Comment on lines 14 to 21
const handleNext = () => {
mutate(
{
name,
school,
universityId,
studentNumber: studentId,
isMarketingAgreement,
},
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

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

The name field is not being persisted to the store before submitting. Unlike the previous steps (TermStep and StudentIdStep) which call update() to save their values to the store, this step goes directly to the API call. If the API call fails and the user navigates back and forth, the entered name will be lost. Consider calling update({ name }) before the mutate() call to maintain consistency with other steps.

Copilot uses AI. Check for mistakes.
<input
type="text"
value={universityName}
placeholder="학교를 입력해주세요.."
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

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

The placeholder text has an inconsistent number of periods. It ends with two periods '..' but should end with a single period '.' for consistency with standard Korean punctuation.

Suggested change
placeholder="학교를 입력해주세요.."
placeholder="학교를 입력해주세요."

Copilot uses AI. Check for mistakes.
Comment on lines +26 to +29
const trimmed = universityName.trim();
const filteredUniversities = !trimmed
? (universityList?.universities ?? [])
: (universityList?.universities.filter((university) => university.name.includes(trimmed)) ?? []);
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

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

The filtering logic recalculates on every render. If the university list is large, this could cause performance issues. Consider using useMemo to memoize the filtered results, especially since the calculation depends only on universityName and universityList.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback
In this project, we are using the React Compiler, so this kind of calculation is automatically memoized by the compiler.
Since the filtering logic is a pure computation that depends only on universityName and universityList, React Compiler can safely optimize it without needing an explicit useMemo.

Comment on lines +38 to +43
<input
type="text"
value={universityName}
placeholder="학교를 입력해주세요.."
onChange={(e) => setUniversityName(e.target.value)}
className="mt-5 w-full border-b-2 border-indigo-400 py-4 text-[20px] font-bold text-indigo-300 placeholder:text-indigo-300"
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

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

The search input lacks proper accessibility attributes. Consider adding an aria-label or id with associated label for screen readers, and aria-describedby to connect it with the description text. This helps users with assistive technologies understand the input's purpose.

Suggested change
<input
type="text"
value={universityName}
placeholder="학교를 입력해주세요.."
onChange={(e) => setUniversityName(e.target.value)}
className="mt-5 w-full border-b-2 border-indigo-400 py-4 text-[20px] font-bold text-indigo-300 placeholder:text-indigo-300"
<input
id="university-search"
type="text"
value={universityName}
placeholder="학교를 입력해주세요.."
onChange={(e) => setUniversityName(e.target.value)}
className="mt-5 w-full border-b-2 border-indigo-400 py-4 text-[20px] font-bold text-indigo-300 placeholder:text-indigo-300"
aria-label="학교 검색"

Copilot uses AI. Check for mistakes.
? (universityList?.universities ?? [])
: (universityList?.universities.filter((university) => university.name.includes(trimmed)) ?? []);

const handleSchoolSelect = (universityId: string) => () => {
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

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

The handler function is named 'handleSchoolSelect' but should be renamed to 'handleUniversitySelect' for consistency with the component and feature naming convention.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI commented Dec 15, 2025

@ff1451 I've opened a new pull request, #12, to work on those changes. Once the pull request is ready, I'll request review from you.

@ff1451 ff1451 merged commit 042e51d into develop Dec 15, 2025
1 check passed
@ff1451 ff1451 deleted the 10-feat-회원가입-api-변경사항-반영-및-로직-수정 branch December 15, 2025 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] 회원가입 api 변경사항 반영 및 로직 수정

2 participants