2
0
mirror of https://github.com/iconify/iconify.git synced 2024-12-05 02:33:16 +00:00

chore(react): minor changes

This commit is contained in:
Vjacheslav Trushkin 2024-04-28 18:45:02 +03:00
parent 61a5383f46
commit 13909ada1f

View File

@ -225,6 +225,9 @@ interface InternalIconProps extends IconProps {
}
function IconComponent(props: InternalIconProps): JSX.Element {
interface AbortState {
callback?: IconifyIconLoaderAbort;
}
interface State {
// Currently rendered icon
name: string;
@ -232,11 +235,8 @@ function IconComponent(props: InternalIconProps): JSX.Element {
// Icon data, null if missing
data?: IconifyIcon | null;
}
const [mounted, setMounted] = useState(!!props.ssr);
interface AbortState {
callback?: IconifyIconLoaderAbort;
}
const [mounted, setMounted] = useState(!!props.ssr);
const [abort, setAbort] = useState<AbortState>({});
const [state, setState] = useState<State>({
name: '',