feat: support static server
This commit is contained in:
@@ -4,7 +4,7 @@ import {
|
||||
SidebarMenuItem,
|
||||
} from '@/components/ui/sidebar';
|
||||
|
||||
import { Image } from '@/components/ui/image';
|
||||
import { Img } from '@/components/ui/img';
|
||||
|
||||
export function AppIcon() {
|
||||
return (
|
||||
@@ -16,7 +16,7 @@ export function AppIcon() {
|
||||
>
|
||||
<div className="flex size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground">
|
||||
<div className="relative size-8">
|
||||
<Image
|
||||
<Img
|
||||
src="/assets/favicon.png"
|
||||
alt="App Logo"
|
||||
className="object-cover"
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
import type { ComponentProps } from 'react';
|
||||
|
||||
export type ImageProps = Omit<ComponentProps<'img'>, 'alt'> &
|
||||
Required<Pick<ComponentProps<'img'>, 'alt'>>;
|
||||
|
||||
export const Image = (props: ImageProps) => {
|
||||
// biome-ignore lint/nursery/noImgElement: <explanation>
|
||||
return <img {...props} alt={props.alt} />;
|
||||
};
|
||||
9
apps/webui/src/components/ui/img.tsx
Normal file
9
apps/webui/src/components/ui/img.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import type { ComponentProps } from "react";
|
||||
|
||||
export type ImgProps = Omit<ComponentProps<"img">, "alt"> &
|
||||
Required<Pick<ComponentProps<"img">, "alt">>;
|
||||
|
||||
export const Img = (props: ImgProps) => {
|
||||
// biome-ignore lint/nursery/noImgElement: <explanation>
|
||||
return <img {...props} alt={props.alt} />;
|
||||
};
|
||||
Reference in New Issue
Block a user