mirror of
https://github.com/tachiyomiorg/tachiyomi-extensions-inspector.git
synced 2025-01-24 06:21:16 +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);
|
const { setTitle } = useContext(NavBarTitle);
|
||||||
setTitle('Extensions');
|
setTitle('Extensions');
|
||||||
const [extensions, setExtensions] = useState<IExtension[]>([]);
|
const [extensions, setExtensions] = useState<IExtension[]>([]);
|
||||||
let mapped;
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetch('http://127.0.0.1:4567/api/v1/extension/list')
|
fetch('http://127.0.0.1:4567/api/v1/extension/list')
|
||||||
@ -15,10 +14,7 @@ export default function Extensions() {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
if (extensions.length === 0) {
|
if (extensions.length === 0) {
|
||||||
mapped = <h3>wait</h3>;
|
return <h3>wait</h3>;
|
||||||
} else {
|
|
||||||
mapped = extensions.map((it) => <ExtensionCard extension={it} />);
|
|
||||||
}
|
}
|
||||||
|
return <>{extensions.map((it) => <ExtensionCard extension={it} />)}</>;
|
||||||
return <h2>{mapped}</h2>;
|
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,6 @@ export default function Sources() {
|
|||||||
const { setTitle } = useContext(NavBarTitle);
|
const { setTitle } = useContext(NavBarTitle);
|
||||||
setTitle('Sources');
|
setTitle('Sources');
|
||||||
const [sources, setSources] = useState<ISource[]>([]);
|
const [sources, setSources] = useState<ISource[]>([]);
|
||||||
let mapped;
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetch('http://127.0.0.1:4567/api/v1/source/list')
|
fetch('http://127.0.0.1:4567/api/v1/source/list')
|
||||||
@ -15,10 +14,7 @@ export default function Sources() {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
if (sources.length === 0) {
|
if (sources.length === 0) {
|
||||||
mapped = <h3>wait</h3>;
|
return (<h3>wait</h3>);
|
||||||
} else {
|
|
||||||
mapped = sources.map((it) => <SourceCard source={it} />);
|
|
||||||
}
|
}
|
||||||
|
return <>{sources.map((it) => <SourceCard source={it} />)}</>;
|
||||||
return <h2>{mapped}</h2>;
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user