diff --git a/frontend/src/components/description.tsx b/frontend/src/components/description.tsx index 0109550..6b5f22d 100644 --- a/frontend/src/components/description.tsx +++ b/frontend/src/components/description.tsx @@ -1,42 +1,42 @@ -import { Icon } from "@iconify/react"; - -interface Props { - text: string; - className?: string; -} - -// Adds fancy formatting to links -export default function Description({ text, className }: Props) { - const urlRegex = /(https?:\/\/[^\s]+)/g; - const parts = text.split(urlRegex); - - return ( -

- {parts.map(async (part, index) => { - try { - // Check if it's a URL - if (!urlRegex.test(part)) throw new Error("Not a URL"); - const url = new URL(part); - - return ( - - {url.hostname} - {url.pathname !== "/" ? url.pathname : ""} - {url.search} - - - ); - } catch { - // Normal text/Invalid URL fallback - return {part}; - } - })} -

- ); -} +import { Icon } from "@iconify/react"; + +interface Props { + text: string; + className?: string; +} + +// Adds fancy formatting to links +export default function Description({ text, className }: Props) { + const urlRegex = /(https?:\/\/[^\s]+)/g; + const parts = text.split(urlRegex); + + return ( +

+ {parts.map((part, index) => { + try { + // Check if it's a URL + if (!urlRegex.test(part)) throw new Error("Not a URL"); + const url = new URL(part); + + return ( + + {url.hostname} + {url.pathname !== "/" ? url.pathname : ""} + {url.search} + + + ); + } catch { + // Normal text/Invalid URL fallback + return {part}; + } + })} +

+ ); +} diff --git a/frontend/src/pages/mii.tsx b/frontend/src/pages/mii.tsx index 1300219..00b4778 100644 --- a/frontend/src/pages/mii.tsx +++ b/frontend/src/pages/mii.tsx @@ -1,6 +1,6 @@ import type { SwitchMiiInstructions } from "@tomodachi-share/shared"; -// import ImageViewer from "../components/image-viewer"; +import ImageViewer from "../components/image-viewer"; import LikeButton from "../components/like-button"; import Description from "../components/description"; import ShareMiiButton from "../components/mii/share-mii-button"; @@ -64,7 +64,7 @@ export default function MiiPage() {
{/* Mii Image */}
- mii headshot - mii qr code
) : ( - mii features - mii screenshot
))}