Skip to content
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

[ Fix ] 가입시 Role 받아오는 로직 수정 #341

Merged
merged 3 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading