diff --git a/src/api/auth/auth.post.api.ts b/src/api/auth/auth.post.api.ts index dc4ce7c..5792959 100644 --- a/src/api/auth/auth.post.api.ts +++ b/src/api/auth/auth.post.api.ts @@ -29,6 +29,7 @@ export const signup = async ({ memberPhone, memberSmsAgree }); + //retrun nll 처리를 하면 react query의 onSuccess 작동 return response; }; diff --git a/src/stores/user.ts b/src/stores/user.ts new file mode 100644 index 0000000..b9591ff --- /dev/null +++ b/src/stores/user.ts @@ -0,0 +1,28 @@ +import { create } from 'zustand'; +import { persist } from 'zustand/middleware'; + +/* eslint-disable no-unused-vars */ + +interface IMember { + member: object; + setmember: (payload: string) => void; +} + +export const useMemberStore = create( + persist( + (set) => ({ + member: { job: '' }, + setmember: (payload: string) => + set((state) => ({ + ...state, + member: { + ...state.member, + job: payload + } + })) + }), + { + name: 'job' + } + ) +);