mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-18 07:26:02 +01:00
fix(nui): Fix incorrect string typing and remove tsignore
This commit is contained in:
@@ -63,13 +63,12 @@ const Notifications: React.FC = () => {
|
|||||||
useNuiEvent<CustomProps>("customNotify", (data) => {
|
useNuiEvent<CustomProps>("customNotify", (data) => {
|
||||||
if (data.id && toast.isActive(data.id)) return;
|
if (data.id && toast.isActive(data.id)) return;
|
||||||
if (!data.icon) {
|
if (!data.icon) {
|
||||||
//@ts-expect-error because amazing types
|
|
||||||
data.icon =
|
data.icon =
|
||||||
data.type === "error"
|
data.type === "error"
|
||||||
? "fa-circle-xmark"
|
? "circle-xmark"
|
||||||
: data.type === "success"
|
: data.type === "success"
|
||||||
? "fa-circle-check"
|
? "circle-check"
|
||||||
: "fa-circle-info";
|
: "circle-info";
|
||||||
}
|
}
|
||||||
|
|
||||||
toast({
|
toast({
|
||||||
@@ -84,15 +83,14 @@ const Notifications: React.FC = () => {
|
|||||||
boxShadow="md"
|
boxShadow="md"
|
||||||
>
|
>
|
||||||
<HStack spacing={0}>
|
<HStack spacing={0}>
|
||||||
{
|
{data.icon && (
|
||||||
<FontAwesomeIcon
|
<FontAwesomeIcon
|
||||||
//@ts-expect-error because amazing types
|
|
||||||
icon={data.icon}
|
icon={data.icon}
|
||||||
fontSize="1.3em"
|
fontSize="1.3em"
|
||||||
style={{ paddingRight: 8 }}
|
style={{ paddingRight: 8 }}
|
||||||
color={data.iconColor}
|
color={data.iconColor}
|
||||||
/>
|
/>
|
||||||
}
|
)}
|
||||||
<Box w="100%">
|
<Box w="100%">
|
||||||
{data.title && <Text as="b">{data.title}</Text>}
|
{data.title && <Text as="b">{data.title}</Text>}
|
||||||
{data.description && <Text>{data.description}</Text>}
|
{data.description && <Text>{data.description}</Text>}
|
||||||
|
|||||||
Reference in New Issue
Block a user