Skip to content

Commit 3049302

Browse files
committed
fix add friends button not visible
1 parent d4ccb98 commit 3049302

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

frontend/src/ts/elements/profile.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,7 @@ export function updateFriendRequestButton(): void {
452452
button?.classList.add("disabled");
453453
} else {
454454
button?.classList.remove("disabled");
455+
button?.classList.remove("hidden");
455456
}
456457
}
457458
const throttledEvent = throttle(1000, () => {

frontend/src/ts/pages/profile.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import * as TestActivity from "../elements/test-activity";
1212
import { TestActivityCalendar } from "../elements/test-activity-calendar";
1313
import { getFirstDayOfTheWeek } from "../utils/date-and-time";
1414
import { addFriend } from "./friends";
15-
import * as AuthEvent from "../observables/auth-event";
1615

1716
const firstDayOfTheWeek = getFirstDayOfTheWeek();
1817

@@ -287,10 +286,4 @@ export const page = new Page<undefined | UserProfile>({
287286
},
288287
});
289288

290-
AuthEvent.subscribe((event) => {
291-
if (event.type === "authStateChanged") {
292-
Profile.updateFriendRequestButton();
293-
}
294-
});
295-
296289
Skeleton.save("pageProfile");

0 commit comments

Comments
 (0)