Skip to content

Commit

Permalink
fix add salon profile
Browse files Browse the repository at this point in the history
  • Loading branch information
skang9810 committed Dec 19, 2024
1 parent b863f56 commit e765378
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/pages/Notification.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const Notification = () => {
onClick={async () => {
if (await markAsRead(notification.id)) {
if (notification.type === '결제')
navigate(paths.requestHistoryDetail);
navigate(paths.requestHistory);
else if (notification.type === '견적 요청') {
navigate(paths.requestHistoryDetail, {
state: {
Expand Down
6 changes: 4 additions & 2 deletions src/pages/Survey/AddSalonProfile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ import {
postGroomerProfile,
} from '@/api/groomerProfile';
import paths from '@/routes/paths';
import { useState } from 'react';

function AddSalonProfile() {
const navigate = useNavigate();
const { groomerInfo, businessInfo, step, setStep } = useSurveyGroomerStore();
const [validNickname, setValidNickname] = useState(false);

const validatePhoneNumber = (phoneNumber) => {
const regex = /^\d{3}-\d{4}-\d{4}$/;
Expand All @@ -28,7 +30,7 @@ function AddSalonProfile() {
const isStepValid = () => {
switch (step) {
case 1:
return groomerInfo.name.trim() !== '';
return groomerInfo.name.trim() !== '' && validNickname;
case 2:
return groomerInfo.servicesOfferedId.length > 0;
case 3:
Expand Down Expand Up @@ -75,7 +77,7 @@ function AddSalonProfile() {
backHandler={handleBack}
/>
<Container maxWidth="sm" sx={{ px: 2, pb: 8 }}>
{step === 1 && <Step1 />}
{step === 1 && <Step1 setValidNickname={setValidNickname} />}
{step === 2 && <Step2 />}
{step === 3 && <Step3 />}
{step === 4 && <Step4 />}
Expand Down

0 comments on commit e765378

Please sign in to comment.