Skip to content

Commit 60c85fe

Browse files
committed
fix: add proper formatting and biome-compliant commas, spaces, and newlines
1 parent ea74fdb commit 60c85fe

File tree

4 files changed

+51
-46
lines changed

4 files changed

+51
-46
lines changed

site/src/components/Avatar/Avatar.tsx

+48-43
Original file line numberDiff line numberDiff line change
@@ -70,49 +70,54 @@ export type AvatarProps = AvatarPrimitive.AvatarProps &
7070
const Avatar = React.forwardRef<
7171
React.ElementRef<typeof AvatarPrimitive.Root>,
7272
AvatarProps
73-
>(({ className, size, variant, src, fallback, listView, children, ...props }, ref) => {
74-
const theme = useTheme();
75-
76-
// Process list view styling
77-
const processedCss = {
78-
...(listView && {
79-
width: "42px",
80-
height: "42px",
81-
fontSize: "16px",
82-
...(src && {
83-
background: "transparent !important",
84-
backgroundColor: "transparent !important",
85-
border: "none !important",
86-
boxShadow: "none !important",
87-
padding: 0,
88-
"& img": {
89-
transform: "scale(1.3)", // 30% larger icon
90-
}
91-
})
92-
})
93-
};
94-
95-
return (
96-
<AvatarPrimitive.Root
97-
ref={ref}
98-
className={cn(avatarVariants({ size, variant, className }))}
99-
css={processedCss}
100-
{...props}
101-
>
102-
<AvatarPrimitive.Image
103-
src={src}
104-
className="aspect-square h-full w-full object-contain"
105-
css={getExternalImageStylesFromUrl(theme.externalImages, src)}
106-
/>
107-
{fallback && (
108-
<AvatarPrimitive.Fallback className="flex h-full w-full items-center justify-center">
109-
{fallback.charAt(0).toUpperCase()}
110-
</AvatarPrimitive.Fallback>
111-
)}
112-
{children}
113-
</AvatarPrimitive.Root>
114-
);
115-
});
73+
>(
74+
(
75+
{ className, size, variant, src, fallback, listView, children, ...props },
76+
ref,
77+
) => {
78+
const theme = useTheme();
79+
80+
// Process list view styling
81+
const processedCss = {
82+
...(listView && {
83+
width: "42px",
84+
height: "42px",
85+
fontSize: "16px",
86+
...(src && {
87+
background: "transparent !important",
88+
backgroundColor: "transparent !important",
89+
border: "none !important",
90+
boxShadow: "none !important",
91+
padding: 0,
92+
"& img": {
93+
transform: "scale(1.3)", // 30% larger icon
94+
},
95+
}),
96+
}),
97+
};
98+
99+
return (
100+
<AvatarPrimitive.Root
101+
ref={ref}
102+
className={cn(avatarVariants({ size, variant, className }))}
103+
css={processedCss}
104+
{...props}
105+
>
106+
<AvatarPrimitive.Image
107+
src={src}
108+
className="aspect-square h-full w-full object-contain"
109+
css={getExternalImageStylesFromUrl(theme.externalImages, src)}
110+
/>
111+
{fallback && (
112+
<AvatarPrimitive.Fallback className="flex h-full w-full items-center justify-center">
113+
{fallback.charAt(0).toUpperCase()}
114+
</AvatarPrimitive.Fallback>
115+
)}
116+
{children}
117+
</AvatarPrimitive.Root>
118+
);
119+
},
120+
);
116121
Avatar.displayName = AvatarPrimitive.Root.displayName;
117122

118123
export { Avatar };

site/src/components/Avatar/AvatarData.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ export const AvatarData: FC<AvatarDataProps> = ({
6464
</Stack>
6565
</Stack>
6666
);
67-
};
67+
};

site/src/pages/TemplatesPage/TemplatesPageView.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -322,4 +322,4 @@ const styles = {
322322
transition: "none",
323323
color: theme.palette.text.primary,
324324
}),
325-
} satisfies Record<string, Interpolation<Theme>>;
325+
} satisfies Record<string, Interpolation<Theme>>;

site/src/pages/WorkspacesPage/WorkspacesTable.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -343,4 +343,4 @@ const TableLoader: FC<TableLoaderProps> = ({ canCheckWorkspaces }) => {
343343

344344
const cantBeChecked = (workspace: Workspace) => {
345345
return ["deleting", "pending"].includes(workspace.latest_build.status);
346-
};
346+
};

0 commit comments

Comments
 (0)