Polish frontend

This commit is contained in:
jerlendds
2023-12-09 08:00:25 -07:00
parent 905a430a35
commit afae7fbefe
2 changed files with 17 additions and 9 deletions

View File

@@ -362,10 +362,18 @@ export type Entity = {
updated: string;
created: string;
};
export type EntityInList = {
label: string;
author: string;
description: string;
id: string;
last_edited: string;
is_favorite: boolean;
};
export type AllEntitiesList = {
entities: Entity[];
entities: EntityInList[];
count: number;
favorite_entities: Entity[];
favorite_entities: EntityInList[];
favorite_count: number;
};
export type PostEntityCreate = {

View File

@@ -2,15 +2,15 @@ import classNames from 'classnames';
import Sprite from '@assets/images/tabler-sprite.svg';
export const Icon = ({ icon, className }: { icon: string, className?: string }) => {
// console.log('wtf', wtf)
console.log(import(`@tabler/icons/12-hours.svg`).then(x => console.log(x)))
// console.log('sprite', Sprite)
// TODO: Remove sprite and figure this approach out somehow
// const svgIcon = import(`@tabler/icons/${icon}.svg`).then(x => x).catch(() => <>why no work?!</>)
return (
<svg className={className ? className : 'h-5 w-5'} fill='#fff' color='#fff'>
<use href={`${Sprite}#tabler-${icon}`} />
</svg>
<>
<svg className={className ? className : 'h-5 w-5'} fill='#fff' color='#fff'>
<use href={`${Sprite}#tabler-${icon}`} />
</svg>
</>
);
};