diff --git a/TODO.md b/TODO.md index 3f4b426..71361fc 100644 --- a/TODO.md +++ b/TODO.md @@ -20,7 +20,3 @@ - [ ] Избранное - [ ] История - [ ] ... - -## интерфейс - -- [X] Динамический цвет от аватарки diff --git a/frontend/app/components/UserProfile/UserProfile.jsx b/frontend/app/components/UserProfile/UserProfile.jsx index dbdb1af..b51f928 100644 --- a/frontend/app/components/UserProfile/UserProfile.jsx +++ b/frontend/app/components/UserProfile/UserProfile.jsx @@ -97,7 +97,7 @@ export const UserProfile = (props) => { Ваш профиль { + async function _getProfile() { + const _profile = await getData( + `${endpoints.user.profile}/${props.params.id}`, + ); + setProfile(_profile); + } + _getProfile(); + }, [props.params.id]); + + return ( + <> + {profile ? ( + profile.profile ? ( + + ) : ( + notFound() + ) + ) : ( + + )} + + ); +} diff --git a/frontend/next.config.mjs b/frontend/next.config.mjs index d37672a..e7af06f 100644 --- a/frontend/next.config.mjs +++ b/frontend/next.config.mjs @@ -7,6 +7,10 @@ const nextConfig = { protocol: "https", hostname: "anixstatic.com", }, + { + protocol: "https", + hostname: "i.imgur.com", + }, ], }, };