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:
parent
61a5383f46
commit
13909ada1f
@ -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: '',
|
||||
|
Loading…
Reference in New Issue
Block a user