mirror of
https://github.com/Radiquum/AniX.git
synced 2025-04-28 17:09:41 +05:00
feat: add edit profile modal template
This commit is contained in:
parent
3211c260a0
commit
384bd09a27
3 changed files with 85 additions and 1 deletions
|
@ -14,6 +14,7 @@ import { ProfileWatchDynamic } from "#/components/Profile/Profile.WatchDynamic";
|
|||
import { ProfileActions } from "#/components/Profile/Profile.Actions";
|
||||
import { ProfileReleaseRatings } from "#/components/Profile/Profile.ReleaseRatings";
|
||||
import { ProfileReleaseHistory } from "#/components/Profile/Profile.ReleaseHistory";
|
||||
import { ProfileEditModal } from "#/components/Profile/Profile.EditModal";
|
||||
|
||||
const fetcher = async (url: string) => {
|
||||
const res = await fetch(url);
|
||||
|
@ -34,6 +35,8 @@ export const ProfilePage = (props: any) => {
|
|||
const [user, setUser] = useState(null);
|
||||
const [isMyProfile, setIsMyProfile] = useState(false);
|
||||
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
|
||||
let url = `${ENDPOINTS.user.profile}/${props.id}`;
|
||||
if (authUser.token) {
|
||||
url += `?token=${authUser.token}`;
|
||||
|
@ -173,6 +176,8 @@ export const ProfilePage = (props: any) => {
|
|||
token={authUser.token}
|
||||
is_me_blocked={user.is_me_blocked}
|
||||
is_blocked={user.is_blocked}
|
||||
edit_isOpen={isOpen}
|
||||
edit_setIsOpen={setIsOpen}
|
||||
/>
|
||||
)}
|
||||
{!user.is_stats_hidden && (
|
||||
|
@ -202,6 +207,7 @@ export const ProfilePage = (props: any) => {
|
|||
)}
|
||||
</div>
|
||||
</div>
|
||||
<ProfileEditModal isOpen={isOpen && isMyProfile} setIsOpen={setIsOpen} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue