Skip to content

Commit 9a907cb

Browse files
committed
refactor: get user
1 parent 38ea782 commit 9a907cb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/app/about/contexts/about-context.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ export function AboutProvider({ children }: AboutProviderProps) {
161161
if (response?.status === 200) {
162162
const user = response.data.resource[0];
163163
dispatch({ type: "fetch_success", user });
164+
setCookie({ user: JSON.stringify(user) });
164165
}
165166
} catch (error) {
166167
console.error(error);
@@ -222,6 +223,7 @@ export function AboutProvider({ children }: AboutProviderProps) {
222223

223224
setCookie({ user: JSON.stringify(updatedUser) });
224225
dispatch({ type: "fetch_success", user: updatedUser });
226+
await handleGetUser();
225227
handleSetShouldOpenUpdateUserModal();
226228
}
227229
} catch (error) {

0 commit comments

Comments
 (0)