diff --git a/src/app/mii/[id]/page.tsx b/src/app/mii/[id]/page.tsx index 58cd8d8..4bbbfbc 100644 --- a/src/app/mii/[id]/page.tsx +++ b/src/app/mii/[id]/page.tsx @@ -217,7 +217,7 @@ export default async function MiiPage({ params }: Props) {
{session && (Number(session.user.id) === mii.userId || Number(session.user.id) === Number(process.env.NEXT_PUBLIC_ADMIN_USER_ID)) && ( <> - + Edit @@ -226,7 +226,7 @@ export default async function MiiPage({ params }: Props) { )} - + Report diff --git a/src/app/submit/page.tsx b/src/app/submit/page.tsx index ef0dbd9..5c9bf2c 100644 --- a/src/app/submit/page.tsx +++ b/src/app/submit/page.tsx @@ -41,7 +41,7 @@ export default async function SubmitPage() {

Sorry

Submissions are disabled

- + Return Home diff --git a/src/components/admin/punishment-deletion-dialog.tsx b/src/components/admin/punishment-deletion-dialog.tsx index 9dd0981..133a706 100644 --- a/src/components/admin/punishment-deletion-dialog.tsx +++ b/src/components/admin/punishment-deletion-dialog.tsx @@ -49,7 +49,7 @@ export default function PunishmentDeletionDialog({ punishmentId }: Props) { return ( <> - @@ -70,7 +70,7 @@ export default function PunishmentDeletionDialog({ punishmentId }: Props) { >

Punishment Deletion

-
diff --git a/src/components/admin/reports.tsx b/src/components/admin/reports.tsx index 3f56c84..d447b44 100644 --- a/src/components/admin/reports.tsx +++ b/src/components/admin/reports.tsx @@ -108,10 +108,11 @@ export default async function Reports() {
@@ -120,6 +121,7 @@ export default async function Reports() { diff --git a/src/components/admin/user-management.tsx b/src/components/admin/user-management.tsx index 784d7c4..5956c5a 100644 --- a/src/components/admin/user-management.tsx +++ b/src/components/admin/user-management.tsx @@ -274,7 +274,7 @@ export default function Punishments() { value={newMii.reason} onChange={(e) => setNewMii({ ...newMii, reason: e.target.value })} /> -
@@ -295,6 +295,7 @@ export default function Punishments() {
) : ( - )} @@ -78,7 +84,7 @@ export default function DeleteMiiButton({ miiId, miiName, likes, inMiiPage }: Pr >

Delete Mii

-
diff --git a/src/components/header.tsx b/src/components/header.tsx index dea3349..5065400 100644 --- a/src/components/header.tsx +++ b/src/components/header.tsx @@ -13,7 +13,11 @@ export default async function Header() { return (
- + logo TomodachiShare diff --git a/src/components/image-viewer.tsx b/src/components/image-viewer.tsx index 45b977b..ba1297a 100644 --- a/src/components/image-viewer.tsx +++ b/src/components/image-viewer.tsx @@ -48,7 +48,6 @@ export default function ImageViewer({ src, alt, width, height, className, images setSelectedIndex(index); } - // Scroll snaps setScrollSnaps(emblaApi.scrollSnapList()); emblaApi.on("select", () => setSelectedIndex(emblaApi.selectedScrollSnap())); }, [emblaApi, images, src]); @@ -58,19 +57,9 @@ export default function ImageViewer({ src, alt, width, height, className, images if (!isOpen || !emblaApi) return; const handleKeyDown = (event: KeyboardEvent) => { - switch (event.key) { - case "ArrowLeft": - emblaApi.scrollPrev(); - break; - case "ArrowRight": - emblaApi.scrollNext(); - break; - case "Escape": - close(); - break; - default: - break; - } + if (event.key === "ArrowLeft") emblaApi.scrollPrev(); + else if (event.key === "ArrowRight") emblaApi.scrollNext(); + else if (event.key === "Escape") close(); }; window.addEventListener("keydown", handleKeyDown); @@ -79,6 +68,8 @@ export default function ImageViewer({ src, alt, width, height, className, images }; }, [isOpen, emblaApi]); + const imagesMap = images.length === 0 ? [src] : images; + return ( <> {alt} setIsOpen(true)} /> @@ -94,29 +85,23 @@ export default function ImageViewer({ src, alt, width, height, className, images />
-
-
-
- {images.length == 0 ? ( - {alt} - ) : ( - <> - {images.map((image, index) => ( -
- {alt} -
- ))} - - )} +
+
+ {imagesMap.map((image, index) => ( +
+ {alt} +
+ ))}
@@ -132,6 +117,7 @@ export default function ImageViewer({ src, alt, width, height, className, images > diff --git a/src/components/mii-list/filter-select.tsx b/src/components/mii-list/filter-select.tsx index 0db63a2..3f1238f 100644 --- a/src/components/mii-list/filter-select.tsx +++ b/src/components/mii-list/filter-select.tsx @@ -32,7 +32,7 @@ export default function FilterSelect() { return (
-
diff --git a/src/components/profile-settings/profile-picture.tsx b/src/components/profile-settings/profile-picture.tsx index cb29813..63675b1 100644 --- a/src/components/profile-settings/profile-picture.tsx +++ b/src/components/profile-settings/profile-picture.tsx @@ -72,6 +72,7 @@ export default function ProfilePictureSettings() { {newPicture && ( @@ -58,7 +58,7 @@ export default function SubmitDialogButton({ title, description, onSubmit, error >

{title}

-
diff --git a/src/components/random-link.tsx b/src/components/random-link.tsx index 959a6a4..860e945 100644 --- a/src/components/random-link.tsx +++ b/src/components/random-link.tsx @@ -5,7 +5,7 @@ import { Icon } from "@iconify/react"; export default function RandomLink() { return ( - + ); diff --git a/src/components/report/reason-selector.tsx b/src/components/report/reason-selector.tsx index b9f1f38..6d88d41 100644 --- a/src/components/report/reason-selector.tsx +++ b/src/components/report/reason-selector.tsx @@ -36,7 +36,12 @@ export default function ReasonSelector({ reason, setReason }: Props) { return (
{/* Toggle button to open the dropdown */} - diff --git a/src/components/search-bar.tsx b/src/components/search-bar.tsx index 35c6eab..d25cafe 100644 --- a/src/components/search-bar.tsx +++ b/src/components/search-bar.tsx @@ -37,6 +37,7 @@ export default function SearchBar() { /> @@ -82,7 +82,7 @@ export default function ShareMiiButton({ miiId }: Props) { >

Share Mii

-
@@ -140,6 +140,7 @@ export default function ShareMiiButton({ miiId }: Props) { @@ -149,6 +150,7 @@ export default function ShareMiiButton({ miiId }: Props) { {/* Copy button */} diff --git a/src/components/submit-form/index.tsx b/src/components/submit-form/index.tsx index a4e8fa2..610853f 100644 --- a/src/components/submit-form/index.tsx +++ b/src/components/submit-form/index.tsx @@ -210,7 +210,7 @@ export default function SubmitForm() { or - diff --git a/src/components/submit-form/qr-scanner.tsx b/src/components/submit-form/qr-scanner.tsx index 9dafad1..0041231 100644 --- a/src/components/submit-form/qr-scanner.tsx +++ b/src/components/submit-form/qr-scanner.tsx @@ -145,7 +145,7 @@ export default function QrScanner({ isOpen, setIsOpen, setQrBytesRaw }: Props) { >

Scan QR Code

-
@@ -157,6 +157,7 @@ export default function QrScanner({ isOpen, setIsOpen, setQrBytesRaw }: Props) { {/* Toggle button to open the dropdown */} )} -
diff --git a/src/components/tutorial/scan.tsx b/src/components/tutorial/scan.tsx index fc49b82..93e1bff 100644 --- a/src/components/tutorial/scan.tsx +++ b/src/components/tutorial/scan.tsx @@ -36,7 +36,7 @@ export default function ScanTutorialButton() { return ( <> - @@ -58,7 +58,7 @@ export default function ScanTutorialButton() { >

Tutorial

-
@@ -76,13 +76,21 @@ export default function ScanTutorialButton() {
- Adding Mii to Island -
diff --git a/src/components/tutorial/starting-page.tsx b/src/components/tutorial/starting-page.tsx index e4ef9cd..103cf0b 100644 --- a/src/components/tutorial/starting-page.tsx +++ b/src/components/tutorial/starting-page.tsx @@ -25,6 +25,7 @@ export default function StartingPage({ emblaApi }: Props) {
@@ -105,6 +105,7 @@ export default function SubmitTutorialButton() { onClick={() => emblaApi?.scrollPrev()} disabled={isStartingPage} className={`pill button !p-1 aspect-square text-2xl ${isStartingPage && "!cursor-auto"}`} + aria-label="Scroll Carousel Left" > @@ -115,6 +116,7 @@ export default function SubmitTutorialButton() { onClick={() => emblaApi?.scrollNext()} disabled={isStartingPage} className={`pill button !p-1 aspect-square text-2xl ${isStartingPage && "!cursor-auto"}`} + aria-label="Scroll Carousel Right" >