Skip to content

Commit 4d5a63e

Browse files
Olayinka AdelakunOlayinka Adelakun
authored andcommitted
fix Biome issue
1 parent b39dcc1 commit 4d5a63e

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

  • src/frontend/src
    • components/common/pageLayout
    • pages/SettingsPage/pages/GeneralPage/components/ProfilePictureForm/components/profilePictureChooserComponent

src/frontend/src/components/common/pageLayout/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import type { To } from "react-router-dom";
1+
import { useId } from "react";
22
import { useTranslation } from "react-i18next";
3+
import type { To } from "react-router-dom";
34
import { CustomBanner } from "@/customization/components/custom-banner";
45
import { useCustomNavigate } from "@/customization/hooks/use-custom-navigate";
56
import { Button } from "../../ui/button";
@@ -21,6 +22,7 @@ export default function PageLayout({
2122
betaIcon?: boolean;
2223
backTo?: To;
2324
}) {
25+
const headingId = useId();
2426
const navigate = useCustomNavigate();
2527
const { t } = useTranslation();
2628

@@ -29,7 +31,7 @@ export default function PageLayout({
2931
<div className="mx-auto flex w-full max-w-[1440px] flex-1 flex-col">
3032
<div
3133
role="region"
32-
aria-labelledby="page-layout-heading"
34+
aria-labelledby={headingId}
3335
className="flex flex-col gap-4 p-6 pt-0"
3436
>
3537
<CustomBanner />
@@ -52,7 +54,7 @@ export default function PageLayout({
5254
</Button>
5355
)}
5456
<h2
55-
id="page-layout-heading"
57+
id={headingId}
5658
className="text-2xl font-bold tracking-tight"
5759
data-testid="mainpage_title"
5860
>

src/frontend/src/pages/SettingsPage/pages/GeneralPage/components/ProfilePictureForm/components/profilePictureChooserComponent/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ export default function ProfilePictureChooserComponent({
6161
key={idx}
6262
src={customPreLoadImageUrl(`${folder}/${path}`)}
6363
alt={t("settings.avatarAlt", {
64-
folder,
64+
folder: t(
65+
`settings.profilePictureCategory.${folder}`,
66+
folder,
67+
),
6568
index: idx + 1,
6669
})}
6770
style={{

0 commit comments

Comments
 (0)