From 7c373697f0f457e8966659c1df7d34a322618935 Mon Sep 17 00:00:00 2001 From: ilya-bkv Date: Sat, 3 Dec 2022 14:17:19 +0300 Subject: [PATCH] Fix change fields --- src/components/Pages/profile/ProfileSettingsPage.tsx | 6 ++---- src/context/profile.tsx | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/Pages/profile/ProfileSettingsPage.tsx b/src/components/Pages/profile/ProfileSettingsPage.tsx index 185776a3..d2171e3d 100644 --- a/src/components/Pages/profile/ProfileSettingsPage.tsx +++ b/src/components/Pages/profile/ProfileSettingsPage.tsx @@ -32,10 +32,9 @@ export const ProfileSettingsPage = (props: PageProps) => { method: 'POST', body: formData }) - console.log('!!! resp:', resp) - } catch (e) { - const resp = e.response + } catch (error) { + console.log('!!! error', error) } }) } @@ -182,7 +181,6 @@ export const ProfileSettingsPage = (props: PageProps) => { -
{JSON.stringify(form, null, 2)}
diff --git a/src/context/profile.tsx b/src/context/profile.tsx index 53b13d6e..6f54a45d 100644 --- a/src/context/profile.tsx +++ b/src/context/profile.tsx @@ -34,7 +34,7 @@ const useProfileForm = () => { await loadAuthor({ slug: currentSlug() }) setForm({ name: currentAuthor()?.name, - slug: currentAuthor()?.name, + slug: currentAuthor()?.slug, bio: currentAuthor()?.bio, userpic: currentAuthor()?.userpic, links: currentAuthor()?.links