mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-16 05:36:00 +02:00
add image unloader to sidebar image when no image available
This commit is contained in:
@@ -30,6 +30,7 @@ import {
|
||||
import { Accordion } from '/@/shared/components/accordion/accordion';
|
||||
import { ActionIcon } from '/@/shared/components/action-icon/action-icon';
|
||||
import { Group } from '/@/shared/components/group/group';
|
||||
import { ImageUnloader } from '/@/shared/components/image/image';
|
||||
import { ScrollArea } from '/@/shared/components/scroll-area/scroll-area';
|
||||
import { Text } from '/@/shared/components/text/text';
|
||||
import { Tooltip } from '/@/shared/components/tooltip/tooltip';
|
||||
@@ -190,11 +191,15 @@ export const Sidebar = () => {
|
||||
})}
|
||||
openDelay={500}
|
||||
>
|
||||
<img
|
||||
className={styles.sidebarImage}
|
||||
loading="eager"
|
||||
src={upsizedImageUrl || undefined}
|
||||
/>
|
||||
{upsizedImageUrl ? (
|
||||
<img
|
||||
className={styles.sidebarImage}
|
||||
loading="eager"
|
||||
src={upsizedImageUrl}
|
||||
/>
|
||||
) : (
|
||||
<ImageUnloader />
|
||||
)}
|
||||
</Tooltip>
|
||||
<ActionIcon
|
||||
icon="arrowDownS"
|
||||
|
||||
Reference in New Issue
Block a user