aboutsummaryrefslogtreecommitdiff
path: root/components/account.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'components/account.tsx')
-rw-r--r--components/account.tsx33
1 files changed, 17 insertions, 16 deletions
diff --git a/components/account.tsx b/components/account.tsx
index 7b825cd..f24135f 100644
--- a/components/account.tsx
+++ b/components/account.tsx
@@ -1,4 +1,5 @@
-var dummy = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQYV2P4z/j/PwAHAQL/gXZXNQAAAABJRU5ErkJggg==";
+var dummy =
+ 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQYV2P4z/j/PwAHAQL/gXZXNQAAAABJRU5ErkJggg==';
export function AccountAvatar(props: {
size: number;
@@ -8,24 +9,24 @@ export function AccountAvatar(props: {
id?: string;
}) {
- var image = "";
- image += "/api/user/avatar";
- if (typeof props.id === "string") {
- if (!props.id) image = "";
+ var image = '';
+ image += '/api/user/avatar';
+ if (typeof props.id === 'string') {
+ if (!props.id) image = '';
else image += `?id=${props.id}`;
}
if (props.dummy) image = dummy;
- return <div style={{
- width: props.size,
- height: props.size,
- backgroundColor: props.fallbackFill || "var(--background)",
- backgroundImage: `url(${image})`,
- backgroundSize: "cover",
- display: "inline-block",
- borderRadius: props.size / 2 * Number(props.round || 0)
- }}/>;
+ return <div
+ style={{
+ width: props.size,
+ height: props.size,
+ backgroundColor: props.fallbackFill || 'var(--background)',
+ backgroundImage: `url(${image})`,
+ backgroundSize: 'cover',
+ display: 'inline-block',
+ borderRadius: props.size / 2 * Number(props.round || 0),
+ }}
+ />;
}
-
-