Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: fixes layout import, move content loading down to page level

TzeYiingabdef2531ff3
diff --git a/studio/components/layouts/LogsExplorerLayout/LogsExplorerLayout.tsx b/studio/components/layouts/LogsExplorerLayout/LogsExplorerLayout.tsx
index 7850190b5e1..e98860151f4 100644
--- a/studio/components/layouts/LogsExplorerLayout/LogsExplorerLayout.tsx
+++ b/studio/components/layouts/LogsExplorerLayout/LogsExplorerLayout.tsx
@@ -14,12 +14,6 @@ interface Props {
}
const PageLayout: FC<Props> = ({ subtitle, children }) => {
- const { content, ui } = useStore()
-
- useEffect(() => {
- content.load()
- }, [ui.selectedProject])
-
const canUseLogsExplorer = checkPermissions(PermissionAction.ANALYTICS_READ, 'logflare')
if (!canUseLogsExplorer) {
@@ -32,14 +26,6 @@ const PageLayout: FC<Props> = ({ subtitle, children }) => {
)
}
- if (!content.isLoaded) {
- return (
- <BaseLayout>
- <Loading active={true}>{null}</Loading>
- </BaseLayout>
- )
- }
-
return (
<BaseLayout>
<div className="h-full flex flex-col flex-grow py-6">
diff --git a/studio/pages/project/[ref]/logs-explorer/saved.tsx b/studio/pages/project/[ref]/logs-explorer/saved.tsx
index b5e26aee880..4aef6d9729d 100644
--- a/studio/pages/project/[ref]/logs-explorer/saved.tsx
+++ b/studio/pages/project/[ref]/logs-explorer/saved.tsx
@@ -4,20 +4,21 @@ import { observer } from 'mobx-react-lite'
import { IconSave, Loading } from '@supabase/ui'
import { useStore } from 'hooks'
import { LogsSavedQueriesItem } from 'components/interfaces/Settings/Logs'
-import LogsExplorerLayout from 'components/layouts'
+import { LogsExplorerLayout } from 'components/layouts'
import Table from 'components/to-be-cleaned/Table'
import { useRouter } from 'next/router'
import { NextPageWithLayout } from 'types'
export const LogsSavedPage: NextPageWithLayout = () => {
- const { content } = useStore()
+ const { content, ui } = useStore()
const router = useRouter()
const { ref } = router.query
useEffect(() => {
content.load()
- }, [])
+ }, [ui.selectedProject])
+
if (content.isLoading) {
return <Loading active={true}>{null}</Loading>
}