diff --git a/app/api/config.ts b/app/api/config.ts index 9246acb..ca80d64 100644 --- a/app/api/config.ts +++ b/app/api/config.ts @@ -18,6 +18,7 @@ export const ENDPOINTS = { favorite: `${API_PREFIX}/favorite`, settings: { my: `${API_PREFIX}/profile/preference/my`, + statusEdit: `${API_PREFIX}/profile/preference/status/edit`, statsEdit: `${API_PREFIX}/profile/preference/privacy/stats/edit`, countsEdit: `${API_PREFIX}/profile/preference/privacy/counts/edit`, socialEdit: `${API_PREFIX}/profile/preference/privacy/social/edit`, diff --git a/app/components/Profile/Profile.EditModal.tsx b/app/components/Profile/Profile.EditModal.tsx index 2b51462..160cc93 100644 --- a/app/components/Profile/Profile.EditModal.tsx +++ b/app/components/Profile/Profile.EditModal.tsx @@ -6,6 +6,7 @@ import useSWR from "swr"; import { ENDPOINTS } from "#/api/config"; import { useEffect, useState } from "react"; import { ProfileEditPrivacyModal } from "./Profile.EditPrivacyModal"; +import { ProfileEditStatusModal } from "./Profile.EditStatusModal"; const fetcher = async (url: string) => { const res = await fetch(url); @@ -27,6 +28,7 @@ export const ProfileEditModal = (props: { token: string; }) => { const [privacyModalOpen, setPrivacyModalOpen] = useState(false); + const [statusModalOpen, setStatusModalOpen] = useState(false); const [privacyModalSetting, setPrivacyModalSetting] = useState("none"); const [privacySettings, setPrivacySettings] = useState({ privacy_stats: 9, @@ -38,6 +40,7 @@ export const ProfileEditModal = (props: { vk: false, google: false, }); + const [status, setStatus] = useState(""); const privacy_stat_act_social_text = { 0: "Все пользователи", @@ -68,6 +71,7 @@ export const ProfileEditModal = (props: { vk: data.is_vk_bound || data.isVkBound || false, google: data.is_google_bound || data.isGoogleBound || false, }); + setStatus(data.status); } }, [data]); @@ -95,10 +99,17 @@ export const ProfileEditModal = (props: { Загрузить с устройства
-+ {status} +
+Изменить никнейм