mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-08 07:12:49 +00:00
check if any libraries in AppLayout
This commit is contained in:
parent
bfc3ca0f9b
commit
32ffd5f820
|
@ -12,8 +12,12 @@ function AppLayout() {
|
||||||
|
|
||||||
const os = useOperatingSystem();
|
const os = useOperatingSystem();
|
||||||
|
|
||||||
if (library === null && libraries.data)
|
if (library === null && libraries.data) {
|
||||||
return <Navigate to={`${libraries.data[0].uuid}/overview`} />;
|
const firstLibrary = libraries.data[0];
|
||||||
|
|
||||||
|
if (firstLibrary) return <Navigate to={`${firstLibrary.uuid}/overview`} />;
|
||||||
|
else return <Navigate to="/" />;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
|
Loading…
Reference in a new issue