Skip to content

Commit

Permalink
Merge pull request #341 from TEAM-SEONYAK/fix/#309/profilCompletRoleNull
Browse files Browse the repository at this point in the history
[ Fix ] 가입시 Role 받아오는 로직 수정
  • Loading branch information
se0jinYoon authored Nov 4, 2024
2 parents ba7393d + a40cff1 commit 22b31f3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const Step번호입력 = () => {
setTimeLeft(TIME);
setData((prev) => ({
...prev,
phoneNumber: phoneNumber
phoneNumber: phoneNumber,
}));
},
onError: () => {
Expand Down Expand Up @@ -118,7 +118,6 @@ const Step번호입력 = () => {
if (pathname.includes('senior')) {
mutate.mutate(data, {
onSuccess: (res) => {
console.log(res.data.data);
navigate('/seniorProfile', {
state: {
seniorId: res.data.data.seniorId,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/onboarding/hooks/useJoinQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const useJoinQuery = () => {
const mutation = useMutation({
mutationFn: (requestBody: JoinPropType) => joinAxios(requestBody),
onSuccess: (data) => {
setRole(data.data.role);
setRole(data.data.data.userType);
},
onError: (error) => {
console.log('🔴 join patch Error: ', error);
Expand Down
3 changes: 1 addition & 2 deletions src/pages/promiseList/PromiseListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ import RecentCard from './components/RecentCard';
import Title from './components/Title';
import { useGetPromiseList } from './hooks/queries';
import Loading from '@components/commons/Loading';
import { getRole } from '@utils/storage';
import ErrorPage from '@pages/errorPage/ErrorPage';
import { AutoCloseModal } from '@components/commons/modal/AutoCloseModal';
import { useState } from 'react';
import img_modal_accept from '@assets/images/img_modal_accept.png';

const PromiseListPage = () => {
const [showModal, setShowModal] = useState(false);
const userRole = getRole() + '';
const userRole = localStorage.getItem('seonyakRole') + '';

const { myNickname, pending, scheduled, past, isLoading, isError } = useGetPromiseList();

Expand Down

0 comments on commit 22b31f3

Please sign in to comment.