Skip to content

Commit cd6cfec

Browse files
refactor(profile): migrate edit profile modal to SolidJS
1 parent 064d699 commit cd6cfec

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

frontend/src/ts/components/pages/profile/UserDetails.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { addFriend, isFriend } from "../../../db";
1919
import * as UserReportModal from "../../../modals/user-report";
2020
import { bp } from "../../../states/breakpoints";
2121
import { getUserId, isAuthenticated } from "../../../states/core";
22+
import { showModal } from "../../../states/modals";
2223
import {
2324
showNoticeNotification,
2425
showErrorNotification,
@@ -36,8 +37,6 @@ import { DiscordAvatar } from "../../common/DiscordAvatar";
3637
import { UserBadge } from "../../common/UserBadge";
3738
import { UserFlags } from "../../common/UserFlags";
3839
import { EditProfile } from "../../popups/EditProfile";
39-
import { showModal } from "../../../states/modals";
40-
4140

4241
type Variant = "basic" | "hasSocials" | "hasBioOrKeyboard" | "full";
4342

@@ -100,6 +99,9 @@ export function UserDetails(props: {
10099
isAccountPage={props.isAccountPage}
101100
/>
102101
</div>
102+
<Show when={props.isAccountPage === true}>
103+
<EditProfile />
104+
</Show>
103105
</div>
104106
);
105107
}
@@ -178,7 +180,7 @@ function ActionButtons(props: {
178180
showNoticeNotification("Banned users cannot edit their profile");
179181
return;
180182
}
181-
EditProfileModal.show();
183+
showModal("EditProfile");
182184
}}
183185
/>
184186
<Button

0 commit comments

Comments
 (0)