diff --git a/webUI/react/src/screens/Extensions.tsx b/webUI/react/src/screens/Extensions.tsx index 8678e05..a7961d4 100644 --- a/webUI/react/src/screens/Extensions.tsx +++ b/webUI/react/src/screens/Extensions.tsx @@ -6,7 +6,6 @@ export default function Extensions() { const { setTitle } = useContext(NavBarTitle); setTitle('Extensions'); const [extensions, setExtensions] = useState([]); - 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 =

wait

; - } else { - mapped = extensions.map((it) => ); + return

wait

; } - - return

{mapped}

; + return <>{extensions.map((it) => )}; } diff --git a/webUI/react/src/screens/Sources.tsx b/webUI/react/src/screens/Sources.tsx index 26dadc9..7426e6a 100644 --- a/webUI/react/src/screens/Sources.tsx +++ b/webUI/react/src/screens/Sources.tsx @@ -6,7 +6,6 @@ export default function Sources() { const { setTitle } = useContext(NavBarTitle); setTitle('Sources'); const [sources, setSources] = useState([]); - 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 =

wait

; - } else { - mapped = sources.map((it) => ); + return (

wait

); } - - return

{mapped}

; + return <>{sources.map((it) => )}; }