Polish frontend
This commit is contained in:
@@ -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 = {
|
||||
|
||||
@@ -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>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user