-
Notifications
You must be signed in to change notification settings - Fork 1
자가진단표 로직 구현 #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
JJJ-un
wants to merge
6
commits into
FE-4-main
Choose a base branch
from
FE-19-diagnosis
base: FE-4-main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
자가진단표 로직 구현 #9
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6c1e120
feat: 입력폼 구현[FE-19]
JJJ-un 0333612
feat: 증상 카테고리 추가 페이지 구현[FE-19]
JJJ-un f00a4aa
docs: 폴더위치 변경 및 주석 처리[FE-19]
JJJ-un a355dd6
rename: 파일 위치 수정[FE-19]
JJJ-un dd5d6cf
fix: 파일 충돌 해결[FE-19]
JJJ-un 260dfdf
docs: 파일 위치 수정 및 주석 처리[FE-19]
JJJ-un File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| import React from "react"; | ||
| import Svg, { Path, SvgProps } from "react-native-svg"; | ||
|
|
||
| interface SvgComponentProps extends SvgProps {} | ||
|
|
||
| const MinusButton: React.FC<SvgComponentProps> = (props) => ( | ||
| <Svg | ||
| width={16} | ||
| height={16} | ||
| fill="none" | ||
| {...props} | ||
| > | ||
| <Path | ||
| fill="#000" | ||
| d="M1.143 7.143a1.143 1.143 0 0 0 0 2.286h13.714a1.143 1.143 0 0 0 0-2.286H1.143Z" | ||
| /> | ||
| </Svg> | ||
| ); | ||
|
|
||
| export default MinusButton; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
|
|
||
| export interface StepProps { | ||
| onNext: () => void; | ||
| } | ||
|
|
||
| export type DestinationType = "Hospital" | "Pharmacy"; | ||
|
|
||
| export interface SelectDestinationProps { | ||
| selectedDestination?: DestinationType; | ||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,34 +1,34 @@ | ||
| // 다음 스텝의 이동, 진행률 업데이트 함수 | ||
| const navigateOrSetStep = ( | ||
| index: number, | ||
| index: number, | ||
| steps: string[], | ||
| setStep: (step: string) => void, | ||
| setCurrentStep: (step: string) => void, | ||
| setProgress: (progress: number) => void, | ||
| ) => { | ||
| // 유효한 인덱스인지 검사 (0 이상, 전체 스텝 개수 미만) | ||
| if (index >= 0 && index < steps.length) { | ||
| const nextStep = steps[index]; | ||
| setStep(nextStep); | ||
| setCurrentStep(nextStep); | ||
| setProgress(((index + 1) / steps.length) * 100); | ||
| } | ||
| }; | ||
|
|
||
| // 전체 스텝 이동, 진행률 관리 함수 | ||
| // 헤더 추가 시 뒤로 이동하는 로직 추가 예정 | ||
| export const handleNextClick = | ||
| ( | ||
| getCurrentStepIndex: () => number, | ||
| steps: string[], | ||
| setStep: (step: string) => void, | ||
| setCurrentStep: (step: string) => void, | ||
| setProgress: (progress: number) => void, | ||
| ) => { | ||
| // 유효한 인덱스인지 검사 (0 이상, 전체 스텝 개수 미만) | ||
| if (index >= 0 && index < steps.length) { | ||
| const nextStep = steps[index]; | ||
| setStep(nextStep); | ||
| setCurrentStep(nextStep); | ||
| setProgress(((index + 1) / steps.length) * 100); | ||
| } | ||
| ) => | ||
| () => { | ||
| const nextIndex = getCurrentStepIndex() + 1; | ||
| navigateOrSetStep(nextIndex, steps, setStep, setCurrentStep, setProgress); | ||
| }; | ||
|
|
||
| // 전체 스텝 이동, 진행률 관리 함수 | ||
| // 헤더 추가 시 뒤로 이동하는 로직 추가 예정 | ||
| export const handleNextClick = | ||
| ( | ||
| getCurrentStepIndex: () => number, | ||
| steps: string[], | ||
| setStep: (step: string) => void, | ||
| setCurrentStep: (step: string) => void, | ||
| setProgress: (progress: number) => void, | ||
| ) => | ||
| () => { | ||
| const nextIndex = getCurrentStepIndex() + 1; | ||
| navigateOrSetStep(nextIndex, steps, setStep, setCurrentStep, setProgress); | ||
| }; | ||
|
|
||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import { create } from "zustand"; | ||
|
|
||
| type DiagnosisState = { | ||
| currentPage: "main" | "add"; | ||
| setPage: (step: "main" | "add") => void; | ||
| }; | ||
|
|
||
| interface SymptomsState { | ||
| customSymptoms: string[]; | ||
| addSymptom: (symptom: string) => void; | ||
| removeSymptom: (symptom: string) => void; | ||
| } | ||
|
|
||
| // 증상 카테고리 추가 페이지 이동 상태관리 | ||
| export const useDiagnosisStore = create<DiagnosisState>((set) => ({ | ||
| currentPage: "main", | ||
| setPage: (step) => set({ currentPage: step }), | ||
| })); | ||
|
|
||
| // 추가 증상 상태관리 | ||
| export const useSymptomsStore = create<SymptomsState>((set) => ({ | ||
| customSymptoms: [], | ||
| addSymptom: (symptom) => | ||
| set((state) => ({ customSymptoms: [...state.customSymptoms, symptom] })), | ||
| removeSymptom: (symptom) => | ||
| set((state) => ({ customSymptoms: state.customSymptoms.filter((s) => s !== symptom) })), | ||
| })); |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
타입과 상수는 별도로 파일로 분리하여 관리해주세요!