mirror of
https://github.com/tachiyomiorg/tachiyomi-extensions-inspector.git
synced 2024-11-01 06:55:06 +01:00
remove some wierdness
This commit is contained in:
parent
dcdd50ffe1
commit
84676b9156
@ -6,7 +6,6 @@ export default function Extensions() {
|
||||
const { setTitle } = useContext(NavBarTitle);
|
||||
setTitle('Extensions');
|
||||
const [extensions, setExtensions] = useState<IExtension[]>([]);
|
||||
let mapped;
|
||||
|
||||
useEffect(() => {
|
||||
fetch('http://127.0.0.1:4567/api/v1/extension/list')
|
||||
@ -15,10 +14,7 @@ export default function Extensions() {
|
||||
}, []);
|
||||
|
||||
if (extensions.length === 0) {
|
||||
mapped = <h3>wait</h3>;
|
||||
} else {
|
||||
mapped = extensions.map((it) => <ExtensionCard extension={it} />);
|
||||
return <h3>wait</h3>;
|
||||
}
|
||||
|
||||
return <h2>{mapped}</h2>;
|
||||
return <>{extensions.map((it) => <ExtensionCard extension={it} />)}</>;
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ export default function Sources() {
|
||||
const { setTitle } = useContext(NavBarTitle);
|
||||
setTitle('Sources');
|
||||
const [sources, setSources] = useState<ISource[]>([]);
|
||||
let mapped;
|
||||
|
||||
useEffect(() => {
|
||||
fetch('http://127.0.0.1:4567/api/v1/source/list')
|
||||
@ -15,10 +14,7 @@ export default function Sources() {
|
||||
}, []);
|
||||
|
||||
if (sources.length === 0) {
|
||||
mapped = <h3>wait</h3>;
|
||||
} else {
|
||||
mapped = sources.map((it) => <SourceCard source={it} />);
|
||||
return (<h3>wait</h3>);
|
||||
}
|
||||
|
||||
return <h2>{mapped}</h2>;
|
||||
return <>{sources.map((it) => <SourceCard source={it} />)}</>;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user