Skip to content

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

Clean up existing components

Joshen Lim4b23f87d6132
diff --git a/apps/temp-docs/components/Admonition.tsx b/apps/temp-docs/components/Admonition.tsx
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/apps/temp-docs/components/DarkModeToggle.tsx b/apps/temp-docs/components/Footer/DarkModeToggle.tsx
similarity index 100%
rename from apps/temp-docs/components/DarkModeToggle.tsx
rename to apps/temp-docs/components/Footer/DarkModeToggle.tsx
diff --git a/apps/temp-docs/components/Footer.tsx b/apps/temp-docs/components/Footer/index.tsx
similarity index 98%
rename from apps/temp-docs/components/Footer.tsx
rename to apps/temp-docs/components/Footer/index.tsx
index 0be8c2c5194..b690dd003aa 100644
--- a/apps/temp-docs/components/Footer.tsx
+++ b/apps/temp-docs/components/Footer/index.tsx
@@ -1,10 +1,9 @@
-import FooterLinks from 'data/footer.json'
-import SectionContainer from './SectionContainer'
-import DarkModeToggle from './DarkModeToggle'
-import Link from 'next/link'
-import { useTheme } from './Providers'
import { Badge } from 'ui'
+import Link from 'next/link'
import Image from 'next/image'
+import FooterLinks from 'data/footer.json'
+import DarkModeToggle from './DarkModeToggle'
+import { useTheme } from '../Providers'
import * as supabaseLogoWordmarkDark from 'common/assets/images/supabase-logo-wordmark--dark.png'
import * as supabaseLogoWordmarkLight from 'common/assets/images/supabase-logo-wordmark--light.png'
@@ -19,7 +18,7 @@ const Footer = () => {
<h2 id="footerHeading" className="sr-only">
Footer
</h2>
- <SectionContainer>
+ <div className="sm:py-18 container relative mx-auto px-6 py-16 md:py-24 lg:px-16 lg:py-24 xl:px-20">
<div className="xl:grid xl:grid-cols-3 xl:gap-8">
<div className="space-y-8 xl:col-span-1">
<Link href="#" as="/">
@@ -126,7 +125,7 @@ const Footer = () => {
<small className="small">&copy; Supabase Inc</small>
<DarkModeToggle />
</div>
- </SectionContainer>
+ </div>
</footer>
)
}
diff --git a/apps/temp-docs/components/SectionContainer.tsx b/apps/temp-docs/components/SectionContainer.tsx
deleted file mode 100644
index db5ec705165..00000000000
--- a/apps/temp-docs/components/SectionContainer.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-import classNames from 'classnames'
-
-interface Props {
- children: React.ReactNode
- className?: string
-}
-
-const SectionContainer = ({ children, className }: Props) => (
- <div
- className={classNames(
- `sm:py-18 container relative mx-auto px-6 py-16 md:py-24 lg:px-16 lg:py-24 xl:px-20`,
- className
- )}
- >
- {children}
- </div>
-)
-
-export default SectionContainer
diff --git a/apps/temp-docs/components/Sponsor.tsx b/apps/temp-docs/components/Sponsor.tsx
deleted file mode 100644
index f502f1ba56e..00000000000
--- a/apps/temp-docs/components/Sponsor.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-import Image from 'next/image'
-export default function Sponsor({ imageUrl, handle }: { imageUrl: string; handle: string }) {
- return (
- <div className="my-4 flex h-14 w-44 flex-row items-center">
- <Image
- className="mr-2 rounded-full"
- src={`https://github.com/${handle}.png`}
- alt={handle}
- width={32}
- height={32}
- />
- <h5>{handle}</h5>
- </div>
- )
-}
diff --git a/apps/temp-docs/components/SponsorsWrapper.tsx b/apps/temp-docs/components/SponsorsWrapper.tsx
deleted file mode 100644
index b09b6b4b661..00000000000
--- a/apps/temp-docs/components/SponsorsWrapper.tsx
+++ /dev/null
@@ -1,4 +0,0 @@
-import { ReactElement } from 'react'
-export default function SponsorsWrapper({ children }: { children: ReactElement }) {
- return <div className="flex w-full flex-wrap justify-between">{children}</div>
-}
diff --git a/apps/temp-docs/components/TabPanel.tsx b/apps/temp-docs/components/TabPanel.tsx
deleted file mode 100644
index 9427d116692..00000000000
--- a/apps/temp-docs/components/TabPanel.tsx
+++ /dev/null
@@ -1,8 +0,0 @@
-import { Tabs } from 'ui'
-export default function TabPanel(props: { id: string; label: string | undefined; children: any }) {
- return (
- <Tabs.Panel id={props.id} label={props.label}>
- {props.children}
- </Tabs.Panel>
- )
-}
diff --git a/apps/temp-docs/components/TabWrapper.tsx b/apps/temp-docs/components/TabWrapper.tsx
deleted file mode 100644
index 091f7d055aa..00000000000
--- a/apps/temp-docs/components/TabWrapper.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Tabs } from 'ui'
-
-const TabWrapper = (props: any) => {
- return (
- <div className="dashboard-tabs">
- <Tabs size="xlarge" type="underlined">
- <Tabs.Panel id={props.id} label={props.label}>
- {props.children}
- </Tabs.Panel>
- </Tabs>
- </div>
- )
-}
-
-export default TabWrapper
diff --git a/apps/temp-docs/components/index.tsx b/apps/temp-docs/components/index.tsx
index 50feb410e96..747e03536d3 100644
--- a/apps/temp-docs/components/index.tsx
+++ b/apps/temp-docs/components/index.tsx
@@ -1,7 +1,8 @@
import { Tabs, Alert } from 'ui'
-import CodeBlock from './CodeBlock/CodeBlock'
+import Admonition from './Admonition'
import ButtonCard from './ButtonCard'
+import CodeBlock from './CodeBlock/CodeBlock'
import Frameworks from './Frameworks'
import AuthProviders from './AuthProviders'
import { H3, H4 } from './CustomHTMLElements'
@@ -10,6 +11,7 @@ import QuickstartIntro from './MDX/quickstart_intro.mdx'
import ProjectSetup from './MDX/project_setup.mdx'
const components = {
+ Admonition,
ButtonCard,
CodeBlock,
Frameworks,
diff --git a/apps/temp-docs/components/pagination.tsx b/apps/temp-docs/components/pagination-xxx.tsx
similarity index 95%
rename from apps/temp-docs/components/pagination.tsx
rename to apps/temp-docs/components/pagination-xxx.tsx
index 9dbaaffe7a1..97221d63963 100644
--- a/apps/temp-docs/components/pagination.tsx
+++ b/apps/temp-docs/components/pagination-xxx.tsx
@@ -1,7 +1,7 @@
import Link from 'next/link'
import { IconArrowLeft, IconArrowRight } from 'ui'
-const pagination = ({ currentPage, totalCount }: { currentPage: number; totalCount: number }) => {
+const Pagination = ({ currentPage, totalCount }: { currentPage: number; totalCount: number }) => {
// TODO: not sure if this is the most efficient way to do this. may need to refactor.
const totalArray = Array.from({ length: totalCount }, (_, i: number) => i + 1)
const pages = totalArray.filter((page: number) => {
@@ -50,4 +50,4 @@ const pagination = ({ currentPage, totalCount }: { currentPage: number; totalCou
)
}
-export default pagination
+export default Pagination
diff --git a/apps/temp-docs/layouts/Default.tsx b/apps/temp-docs/layouts/Default.tsx
index 09791f8e2f9..eb0dc7ca4f3 100644
--- a/apps/temp-docs/layouts/Default.tsx
+++ b/apps/temp-docs/layouts/Default.tsx
@@ -3,7 +3,6 @@ import Head from 'next/head'
import NavBar from '../components/Navigation/NavBar'
import SideBar from '../components/Navigation/SideBar'
import Footer from '../components/Footer'
-import { Modal } from 'ui'
interface Props {
meta: { title: string; description?: string; hide_table_of_contents?: boolean }