diff --git a/web/components/layout/tabs.tsx b/web/components/layout/tabs.tsx
new file mode 100644
index 00000000..88f27c78
--- /dev/null
+++ b/web/components/layout/tabs.tsx
@@ -0,0 +1,43 @@
+import clsx from 'clsx'
+import { useState } from 'react'
+
+type Tab = {
+ title: string
+ tabIcon?: JSX.Element
+ content: JSX.Element
+}
+
+export function Tabs(props: { tabs: Tab[]; defaultIndex?: number }) {
+ const { tabs, defaultIndex } = props
+ const [activeIndex, setActiveIndex] = useState(defaultIndex ?? 0)
+ const activeTab = tabs[activeIndex]
+
+ return (
+
+ )
+}
diff --git a/web/pages/analytics.tsx b/web/pages/analytics.tsx
index f7aac21b..7344c11b 100644
--- a/web/pages/analytics.tsx
+++ b/web/pages/analytics.tsx
@@ -9,6 +9,7 @@ import {
} from '../components/analytics/charts'
import { Col } from '../components/layout/col'
import { Spacer } from '../components/layout/spacer'
+import { Tabs } from '../components/layout/tabs'
import { Page } from '../components/page'
import { Title } from '../components/title'
import { fromPropz, usePropz } from '../hooks/use-propz'
@@ -250,45 +251,6 @@ export function CustomAnalytics(props: {
)
}
-type Tab = {
- title: string
- content: JSX.Element
-}
-
-function Tabs(props: { tabs: Tab[]; defaultIndex: number }) {
- const { tabs, defaultIndex } = props
- const [activeTab, setActiveTab] = useState(tabs[defaultIndex])
-
- return (
-
- )
-}
-
export function FirebaseAnalytics() {
// Edit dashboard at https://datastudio.google.com/u/0/reporting/faeaf3a4-c8da-4275-b157-98dad017d305/page/Gg3/edit