Skip to content

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

fix typescript build

Alaister Young2fe06c0768e1
diff --git a/studio/components/layouts/LogsLayout/LogsLayout.tsx b/studio/components/layouts/LogsLayout/LogsLayout.tsx
index f13b031e8b5..737d69dba6e 100644
--- a/studio/components/layouts/LogsLayout/LogsLayout.tsx
+++ b/studio/components/layouts/LogsLayout/LogsLayout.tsx
@@ -1,4 +1,4 @@
-import { FC, ReactNode } from 'react'
+import { PropsWithChildren } from 'react'
import { observer } from 'mobx-react-lite'
import { PermissionAction } from '@supabase/shared-types/out/constants'
import { useRouter } from 'next/router'
@@ -8,12 +8,11 @@ import NoPermission from 'components/ui/NoPermission'
import { generateLogsMenu } from './LogsMenu.utils'
import ProductMenu from 'components/ui/ProductMenu'
-interface Props {
- subtitle?: ReactNode
- children?: ReactNode
+interface LogsLayoutProps {
+ title?: string
}
-const LogsLayout: FC<Props> = ({ subtitle, children }) => {
+const LogsLayout = ({ title, children }: PropsWithChildren<LogsLayoutProps>) => {
const { ui } = useStore()
const router = useRouter()
const page = router.pathname.split('/')[4]
@@ -34,6 +33,7 @@ const LogsLayout: FC<Props> = ({ subtitle, children }) => {
return (
<BaseLayout
+ title={title}
product="Logs"
productMenu={<ProductMenu page={page} menu={generateLogsMenu(project)} />}
>
diff --git a/studio/components/layouts/ReportsLayout/ReportsLayout.tsx b/studio/components/layouts/ReportsLayout/ReportsLayout.tsx
index 07888894ebe..3de10ebade9 100644
--- a/studio/components/layouts/ReportsLayout/ReportsLayout.tsx
+++ b/studio/components/layouts/ReportsLayout/ReportsLayout.tsx
@@ -1,4 +1,4 @@
-import { FC, ReactNode } from 'react'
+import { PropsWithChildren } from 'react'
import { observer } from 'mobx-react-lite'
import { useRouter } from 'next/router'
import { useStore, withAuth } from 'hooks'
@@ -6,12 +6,11 @@ import BaseLayout from '..'
import ProductMenu from 'components/ui/ProductMenu'
import { generateReportsMenu } from './ReportsMenu.utils'
-interface Props {
- title: string
- children: ReactNode
+interface ReportsLayoutProps {
+ title?: string
}
-const ReportsLayout: FC<Props> = ({ title, children }) => {
+const ReportsLayout = ({ title, children }: PropsWithChildren<ReportsLayoutProps>) => {
const { ui } = useStore()
const project = ui.selectedProject
diff --git a/studio/pages/new/[slug].tsx b/studio/pages/new/[slug].tsx
index ad89474643c..bb74530426a 100644
--- a/studio/pages/new/[slug].tsx
+++ b/studio/pages/new/[slug].tsx
@@ -1,5 +1,5 @@
import Router, { useRouter } from 'next/router'
-import { useRef, useState, useEffect } from 'react'
+import { useRef, useState, useEffect, PropsWithChildren } from 'react'
import { debounce, isUndefined, values } from 'lodash'
import { toJS } from 'mobx'
import { observer } from 'mobx-react-lite'
@@ -415,7 +415,7 @@ const Wizard: NextPageWithLayout = () => {
}
const PageLayout = withAuth(
- observer(({ children }) => {
+ observer<PropsWithChildren<{}>>(({ children }) => {
const router = useRouter()
const { slug } = router.query
diff --git a/studio/pages/org/[slug]/settings.tsx b/studio/pages/org/[slug]/settings.tsx
index ed262d5e605..c31be23d966 100644
--- a/studio/pages/org/[slug]/settings.tsx
+++ b/studio/pages/org/[slug]/settings.tsx
@@ -1,7 +1,7 @@
import { Tabs } from 'ui'
import { observer, useLocalObservable } from 'mobx-react-lite'
import { useRouter } from 'next/router'
-import { createContext, useContext, useEffect, useState } from 'react'
+import { createContext, PropsWithChildren, useContext, useEffect, useState } from 'react'
import { Member, NextPageWithLayout, Organization, Project, Role, User } from 'types'
import {
@@ -23,7 +23,7 @@ import {
export const PageContext = createContext(null)
const OrgSettingsLayout = withAuth(
- observer(({ children }) => {
+ observer<PropsWithChildren<{}>>(({ children }) => {
const { app, ui } = useStore()
const router = useRouter()
const { slug } = useParams()
@@ -184,4 +184,5 @@ const OrganizationSettings: NextPageWithLayout = () => {
}
OrganizationSettings.getLayout = (page) => <OrgSettingsLayout>{page}</OrgSettingsLayout>
+
export default observer(OrganizationSettings)