fix(nui): Fix incorrect string typing and remove tsignore

This commit is contained in:
Luke
2022-04-11 14:41:07 +02:00
parent 760f18653d
commit 8d375569ab

View File

@@ -63,13 +63,12 @@ const Notifications: React.FC = () => {
useNuiEvent<CustomProps>("customNotify", (data) => {
if (data.id && toast.isActive(data.id)) return;
if (!data.icon) {
//@ts-expect-error because amazing types
data.icon =
data.type === "error"
? "fa-circle-xmark"
? "circle-xmark"
: data.type === "success"
? "fa-circle-check"
: "fa-circle-info";
? "circle-check"
: "circle-info";
}
toast({
@@ -84,15 +83,14 @@ const Notifications: React.FC = () => {
boxShadow="md"
>
<HStack spacing={0}>
{
{data.icon && (
<FontAwesomeIcon
//@ts-expect-error because amazing types
icon={data.icon}
fontSize="1.3em"
style={{ paddingRight: 8 }}
color={data.iconColor}
/>
}
)}
<Box w="100%">
{data.title && <Text as="b">{data.title}</Text>}
{data.description && <Text>{data.description}</Text>}