Prevent rendering certain authenticated routes unless logged in, to avoid initial renders and onMount loaders firing
This commit is contained in:
parent
05d1816814
commit
0ad8eb95e2
|
@ -1,6 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
import { onMount } from "svelte"
|
import { onMount } from "svelte"
|
||||||
import { isActive, goto, redirect } from "@roxi/routify"
|
import { isActive, redirect } from "@roxi/routify"
|
||||||
import { auth } from "stores/backend"
|
import { auth } from "stores/backend"
|
||||||
import { admin } from "stores/portal"
|
import { admin } from "stores/portal"
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { store, automationStore } from "builderStore"
|
import { store, automationStore } from "builderStore"
|
||||||
import { roles } from "stores/backend"
|
import { roles } from "stores/backend"
|
||||||
import {
|
import { Button, Icon, ActionGroup, Tabs, Tab } from "@budibase/bbui"
|
||||||
Button,
|
|
||||||
Icon,
|
|
||||||
Modal,
|
|
||||||
ModalContent,
|
|
||||||
ActionGroup,
|
|
||||||
ActionButton,
|
|
||||||
Tabs,
|
|
||||||
Tab,
|
|
||||||
} from "@budibase/bbui"
|
|
||||||
import SettingsLink from "components/settings/Link.svelte"
|
|
||||||
import ThemeEditorDropdown from "components/settings/ThemeEditorDropdown.svelte"
|
|
||||||
import FeedbackNavLink from "components/feedback/FeedbackNavLink.svelte"
|
|
||||||
import DeployModal from "components/deploy/DeployModal.svelte"
|
import DeployModal from "components/deploy/DeployModal.svelte"
|
||||||
import RevertModal from "components/deploy/RevertModal.svelte"
|
import RevertModal from "components/deploy/RevertModal.svelte"
|
||||||
import { get } from "builderStore/api"
|
import { get } from "builderStore/api"
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
<script>
|
||||||
|
import { auth } from "stores/backend"
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{#if $auth.user}
|
||||||
|
<slot />
|
||||||
|
{/if}
|
Loading…
Reference in New Issue