From bfbcd41500b9437bcccfaa63bc8fd0f79a12606c Mon Sep 17 00:00:00 2001 From: Richard Ward Date: Sun, 17 Jul 2022 22:01:44 +0200 Subject: [PATCH] Fix typing on AccountLayout --- .../layouts/AccountLayout/AccountLayout.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/studio/components/layouts/AccountLayout/AccountLayout.tsx b/studio/components/layouts/AccountLayout/AccountLayout.tsx index 1e8b39c80ac..b822374566a 100644 --- a/studio/components/layouts/AccountLayout/AccountLayout.tsx +++ b/studio/components/layouts/AccountLayout/AccountLayout.tsx @@ -6,6 +6,7 @@ import { API_URL, IS_PLATFORM } from 'lib/constants' import { useStore, withAuth, useFlag } from 'hooks' import WithSidebar from './WithSidebar' import { auth } from 'lib/gotrue' +import { ReactNode } from 'react' export type SidebarLink = { label: string @@ -13,7 +14,7 @@ export type SidebarLink = { key: string icon?: string external?: boolean - isActive?: Boolean + isActive?: boolean subitemsKey?: string onClick?: () => Promise } @@ -25,6 +26,14 @@ export type SidebarSection = { links: SidebarLink[] } +type AccountLayoutProps = { + title: string; + breadcrumbs: { + key: string; + label: string + }[] + children: ReactNode +} /** * layout for dashboard homepage, account and org settings * @@ -33,7 +42,7 @@ export type SidebarSection = { * @param {Array} breadcrumbs */ -const AccountLayout = ({ children, title, breadcrumbs }: any) => { +const AccountLayout = ({ children, title, breadcrumbs }: AccountLayoutProps) => { const router = useRouter() const { app, ui } = useStore()