feat(profile): organize profile sections and use native currency icons
This commit is contained in:
1 parent
6146995758
commit
31691c1c7d
5 files changed
+557
-340
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,51 @@
|
||||
"use client";
|
||||
import { useState } from "react";
|
||||
|
||||
export function ProfileImage({
|
||||
src,
|
||||
alt,
|
||||
width,
|
||||
height,
|
||||
fallback,
|
||||
className,
|
||||
}: {
|
||||
src: string;
|
||||
alt: string;
|
||||
width: number;
|
||||
height: number;
|
||||
fallback?: string;
|
||||
className?: string;
|
||||
}) {
|
||||
const [failedSrc, setFailedSrc] = useState<string | null>(null);
|
||||
const failed = failedSrc === src;
|
||||
if (failed && !fallback)
|
||||
return (
|
||||
<span
|
||||
role="img"
|
||||
aria-label={alt}
|
||||
className={className}
|
||||
style={{
|
||||
width,
|
||||
height,
|
||||
display: "inline-grid",
|
||||
placeItems: "center",
|
||||
fontSize: "2rem",
|
||||
fontWeight: 700,
|
||||
}}
|
||||
>
|
||||
{alt.slice(0, 1).toUpperCase()}
|
||||
</span>
|
||||
);
|
||||
return (
|
||||
<img
|
||||
src={failed ? fallback : src}
|
||||
alt={alt}
|
||||
width={width}
|
||||
height={height}
|
||||
className={className}
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
onError={() => setFailedSrc(src)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -205,6 +205,14 @@
|
||||
"ratelimit": "You're posting too fast. Please wait a moment and try again.",
|
||||
"invalid": "That request was invalid.",
|
||||
"error": "Something went wrong. Please try again."
|
||||
},
|
||||
"noRoomPreview": "Preview unavailable",
|
||||
"viewRoom": "View room",
|
||||
"roomStates": {
|
||||
"open": "Open",
|
||||
"locked": "Doorbell",
|
||||
"password": "Password",
|
||||
"invisible": "Hidden"
|
||||
}
|
||||
},
|
||||
"rankings": {
|
||||
|
||||
@@ -205,6 +205,14 @@
|
||||
"ratelimit": "Stai pubblicando troppo in fretta. Attendi un momento e riprova.",
|
||||
"invalid": "Richiesta non valida.",
|
||||
"error": "Qualcosa è andato storto. Riprova."
|
||||
},
|
||||
"noRoomPreview": "Anteprima non disponibile",
|
||||
"viewRoom": "Vedi stanza",
|
||||
"roomStates": {
|
||||
"open": "Aperta",
|
||||
"locked": "Campanello",
|
||||
"password": "Password",
|
||||
"invisible": "Nascosta"
|
||||
}
|
||||
},
|
||||
"rankings": {
|
||||
|
||||
Reference in new issue
Block a user