mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-20 15:36:18 +00:00
Sweep small typecheck nits: union expansions + React 19 JSX + extra arg
- ColorVariantType missed the 5 outline-* bootstrap variants GroupForumThreadView and GroupForumThreadListView already use; adding them clears 4 errors. - React 19 moved the JSX namespace out of the global scope into the react module; WiredNeighborhoodSelectorView referenced JSX.Element without importing it. - showConfirm() takes 7 args; the chat link confirm in useOnClickChat passed an 8th 'link' icon arg left over from an older signature. - LocalizeText placeholder array is string[]; UserContainerView passed userProfile.friendsCount (number) — call .toString(). Net tsgo error count: 97 -> 90.
This commit is contained in:
@@ -1 +1 @@
|
|||||||
export type ColorVariantType = 'primary' | 'success' | 'danger' | 'secondary' | 'link' | 'black' | 'white' | 'dark' | 'warning' | 'muted' | 'light' | 'gray';
|
export type ColorVariantType = 'primary' | 'success' | 'danger' | 'secondary' | 'link' | 'black' | 'white' | 'dark' | 'warning' | 'muted' | 'light' | 'gray' | 'outline-primary' | 'outline-secondary' | 'outline-success' | 'outline-danger' | 'outline-warning';
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ export const UserContainerView: FC<{
|
|||||||
__html: LocalizeText(
|
__html: LocalizeText(
|
||||||
'extendedprofile.friends.count',
|
'extendedprofile.friends.count',
|
||||||
['count'],
|
['count'],
|
||||||
[userProfile.friendsCount]
|
[userProfile.friendsCount.toString()]
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { GetRoomEngine } from '@nitrots/nitro-renderer';
|
import { GetRoomEngine } from '@nitrots/nitro-renderer';
|
||||||
import { CSSProperties, FC, MouseEvent as ReactMouseEvent, useCallback, useEffect, useMemo, useState } from 'react';
|
import { CSSProperties, FC, JSX, MouseEvent as ReactMouseEvent, useCallback, useEffect, useMemo, useState } from 'react';
|
||||||
import { FaMinus, FaPlus, FaTimes } from 'react-icons/fa';
|
import { FaMinus, FaPlus, FaTimes } from 'react-icons/fa';
|
||||||
import { MdGridOn } from 'react-icons/md';
|
import { MdGridOn } from 'react-icons/md';
|
||||||
import { LocalizeText, WiredFurniType } from '../../../../api';
|
import { LocalizeText, WiredFurniType } from '../../../../api';
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ const useOnClickChatState = () =>
|
|||||||
showConfirm(LocalizeText('chat.confirm.openurl', [ 'url' ], [ url ]), () =>
|
showConfirm(LocalizeText('chat.confirm.openurl', [ 'url' ], [ url ]), () =>
|
||||||
{
|
{
|
||||||
window.open(url, '_blank');
|
window.open(url, '_blank');
|
||||||
}, null, null, null, LocalizeText('generic.alert.title'), null, 'link');
|
}, null, null, null, LocalizeText('generic.alert.title'), null);
|
||||||
};
|
};
|
||||||
|
|
||||||
return { onClickChat };
|
return { onClickChat };
|
||||||
|
|||||||
Reference in New Issue
Block a user