mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-05 09:13:28 +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();
|
||||
|
||||
if (library === null && libraries.data)
|
||||
return <Navigate to={`${libraries.data[0].uuid}/overview`} />;
|
||||
if (library === null && libraries.data) {
|
||||
const firstLibrary = libraries.data[0];
|
||||
|
||||
if (firstLibrary) return <Navigate to={`${firstLibrary.uuid}/overview`} />;
|
||||
else return <Navigate to="/" />;
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
|
|
Loading…
Reference in a new issue