The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
adds basePath to images
Alaister Young7bb2977a28a6
diff --git a/studio/components/interfaces/Auth/AuthProvidersForm/FormField.tsx b/studio/components/interfaces/Auth/AuthProvidersForm/FormField.tsxindex f7c7d879784..3e1105e23b6 100644--- a/studio/components/interfaces/Auth/AuthProvidersForm/FormField.tsx+++ b/studio/components/interfaces/Auth/AuthProvidersForm/FormField.tsx@@ -1,3 +1,4 @@+import Router from 'next/router'import { FC, useState } from 'react'import ReactMarkdown from 'react-markdown'import { Button, Input, InputNumber, Toggle, Listbox, IconEye, IconEyeOff } from 'ui'@@ -123,7 +124,9 @@ const FormField: FC<Props> = ({ name, properties, formValues, disabled = false }key={option.value}label={option.label}value={option.value}- addOnBefore={() => <img className="h-6 w-6" src={`/img/icons/${option.icon}`} />}+ addOnBefore={() => (+ <img className="h-6 w-6" src={`${Router.basePath}/img/icons/${option.icon}`} />+ )}>{option.label}</Listbox.Option>diff --git a/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx b/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsxindex c438d96b468..c845340e38c 100644--- a/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx+++ b/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx@@ -1,4 +1,5 @@import { FC, useState } from 'react'+import Router from 'next/router'import ReactMarkdown from 'react-markdown'import * as Tooltip from '@radix-ui/react-tooltip'import { PermissionAction } from '@supabase/shared-types/out/constants'@@ -78,7 +79,7 @@ const ProviderForm: FC<Props> = ({ provider }) => {width={14}/><img- src={`/img/icons/${provider.misc.iconKey}.svg`}+ src={`${Router.basePath}/img/icons/${provider.misc.iconKey}.svg`}width={18}alt={`${provider.title} auth icon`}/>diff --git a/studio/components/interfaces/Billing/PaymentSummaryPanel/PaymentSummaryPanel.tsx b/studio/components/interfaces/Billing/PaymentSummaryPanel/PaymentSummaryPanel.tsxindex e216eb39c63..27a0d43b710 100644--- a/studio/components/interfaces/Billing/PaymentSummaryPanel/PaymentSummaryPanel.tsx+++ b/studio/components/interfaces/Billing/PaymentSummaryPanel/PaymentSummaryPanel.tsx@@ -1,4 +1,5 @@import { FC, useState } from 'react'+import Router from 'next/router'import * as Tooltip from '@radix-ui/react-tooltip'import { Listbox, IconLoader, Button, IconPlus, IconAlertCircle, IconCreditCard } from 'ui'import { PermissionAction } from '@supabase/shared-types/out/constants'@@ -400,7 +401,7 @@ const PaymentSummaryPanel: FC<Props> = ({addOnBefore={() => {return (<img- src={`/img/payment-methods/${method.card.brand+ src={`${Router.basePath}/img/payment-methods/${method.card.brand.replace(' ', '-').toLowerCase()}.png`}width="32"diff --git a/studio/components/interfaces/Database/Hooks/CreateHook/RadioGroupHookService/RadioHookService.tsx b/studio/components/interfaces/Database/Hooks/CreateHook/RadioGroupHookService/RadioHookService.tsxindex 21331ac5ad7..a8df48d6ae7 100644--- a/studio/components/interfaces/Database/Hooks/CreateHook/RadioGroupHookService/RadioHookService.tsx+++ b/studio/components/interfaces/Database/Hooks/CreateHook/RadioGroupHookService/RadioHookService.tsx@@ -1,4 +1,5 @@import Image from 'next/image'+import Router from 'next/router'import { FC, useContext } from 'react'import { observer } from 'mobx-react-lite'import { Radio, Badge } from 'ui'@@ -27,7 +28,7 @@ const RadioHookService: FC<Props> = observer(<div className="flex items-center space-x-5">{/* <div className="h-3 w-3"> */}<Image- src={`/img/function-providers/${img_url}`}+ src={`${Router.basePath}/img/function-providers/${img_url}`}layout="fixed"width="32"height="32"diff --git a/studio/components/interfaces/Database/Hooks/CreateHook/TableSelection.tsx b/studio/components/interfaces/Database/Hooks/CreateHook/TableSelection.tsxindex e1382da2597..3235d570368 100644--- a/studio/components/interfaces/Database/Hooks/CreateHook/TableSelection.tsx+++ b/studio/components/interfaces/Database/Hooks/CreateHook/TableSelection.tsx@@ -1,4 +1,5 @@import Link from 'next/link'+import Router from 'next/router'import SVG from 'react-inlinesvg'import { FC, useContext } from 'react'import { observer } from 'mobx-react-lite'@@ -73,7 +74,7 @@ const TableSelection: FC = observer(({}) => {addOnBefore={() => (<div className="flex items-center justify-center rounded bg-scale-1200 p-1 text-scale-100 "><SVG- src={'/img/table-editor.svg'}+ src={`${Router.basePath}/img/table-editor.svg`}style={{ width: `16px`, height: `16px`, strokeWidth: '1px' }}preProcessor={(code) =>code.replace(/svg/, 'svg class="m-auto text-color-inherit"')diff --git a/studio/components/interfaces/Database/Triggers/CreateTrigger.tsx b/studio/components/interfaces/Database/Triggers/CreateTrigger.tsxindex fbe743151c9..506f899d38a 100644--- a/studio/components/interfaces/Database/Triggers/CreateTrigger.tsx+++ b/studio/components/interfaces/Database/Triggers/CreateTrigger.tsx@@ -14,7 +14,7 @@ import {Button,} from 'ui'import { Dictionary } from 'components/grid'-import { useRouter } from 'next/router'+import Router, { useRouter } from 'next/router'import SVG from 'react-inlinesvg'import ChooseFunctionForm from './ChooseFunctionForm'@@ -545,7 +545,7 @@ const ListboxTable: FC = observer(({}) => {addOnBefore={() => (<div className="flex items-center justify-center rounded bg-scale-1200 p-1 text-scale-100 "><SVG- src={'/img/table-editor.svg'}+ src={`${Router.basePath}/img/table-editor.svg`}style={{ width: `16px`, height: `16px`, strokeWidth: '1px' }}preProcessor={(code) =>code.replace(/svg/, 'svg class="m-auto text-color-inherit"')diff --git a/studio/components/interfaces/Database/Wrappers/Wrappers.constants.ts b/studio/components/interfaces/Database/Wrappers/Wrappers.constants.tsindex cbb51c09408..a00161aecda 100644--- a/studio/components/interfaces/Database/Wrappers/Wrappers.constants.ts+++ b/studio/components/interfaces/Database/Wrappers/Wrappers.constants.ts@@ -1,3 +1,4 @@+import Router from 'next/router'import { WrapperMeta } from './Wrappers.types'export const WRAPPERS: WrapperMeta[] = [@@ -5,7 +6,7 @@ export const WRAPPERS: WrapperMeta[] = [name: 'stripe_wrapper',handlerName: 'stripe_fdw_handler',validatorName: 'stripe_fdw_validator',- icon: '/img/icons/stripe-icon.svg',+ icon: `${Router.basePath}/img/icons/stripe-icon.svg`,extensionName: 'StripeFdw',label: 'Stripe',docsUrl: 'https://supabase.com/docs/guides/database/wrappers/stripe',@@ -409,7 +410,7 @@ export const WRAPPERS: WrapperMeta[] = [name: 'firebase_wrapper',handlerName: 'firebase_fdw_handler',validatorName: 'firebase_fdw_validator',- icon: '/img/icons/firebase-icon.svg',+ icon: `${Router.basePath}/img/icons/firebase-icon.svg`,extensionName: 'FirebaseFdw',label: 'Firebase',docsUrl: 'https://supabase.com/docs/guides/database/wrappers/firebase',diff --git a/studio/components/interfaces/Database/Wrappers/WrappersDisabledState.tsx b/studio/components/interfaces/Database/Wrappers/WrappersDisabledState.tsxindex 54e4fa6a8b1..c715c7db2e8 100644--- a/studio/components/interfaces/Database/Wrappers/WrappersDisabledState.tsx+++ b/studio/components/interfaces/Database/Wrappers/WrappersDisabledState.tsx@@ -1,4 +1,5 @@import Link from 'next/link'+import Router from 'next/router'import { useState } from 'react'import { Button, IconExternalLink } from 'ui'import { observer } from 'mobx-react-lite'@@ -65,8 +66,8 @@ const WrappersDisabledState = () => {backgroundSize: '45%',backgroundPosition: '105% 40%',backgroundImage: ui.isDarkTheme- ? 'url("/img/wrappers-dark.png")'- : 'url("/img/wrappers-light.png")',+ ? `url("${Router.basePath}/img/wrappers-dark.png")`+ : `url("${Router.basePath}/img/wrappers-light.png")`,}}><div className="w-3/5 space-y-8">diff --git a/studio/components/interfaces/Home/ClientLibrary.tsx b/studio/components/interfaces/Home/ClientLibrary.tsxindex 7e2bd3d8cae..dbcbd7f53b8 100644--- a/studio/components/interfaces/Home/ClientLibrary.tsx+++ b/studio/components/interfaces/Home/ClientLibrary.tsx@@ -1,4 +1,5 @@import { FC } from 'react'+import Router from 'next/router'import { IconBookOpen, IconGitHub, Button, Badge } from 'ui'interface Props {@@ -13,7 +14,7 @@ const ClientLibrary: FC<Props> = ({ language, releaseState, officialSupport, docreturn (<div className="flex items-start space-x-6"><img- src={`/img/libraries/${language.toLowerCase()}-icon.svg`}+ src={`${Router.basePath}/img/libraries/${language.toLowerCase()}-icon.svg`}alt={`${language} logo`}width="21"/>diff --git a/studio/components/interfaces/Home/ExampleProject.tsx b/studio/components/interfaces/Home/ExampleProject.tsxindex a5f6e652796..990f8d19018 100644--- a/studio/components/interfaces/Home/ExampleProject.tsx+++ b/studio/components/interfaces/Home/ExampleProject.tsx@@ -1,4 +1,5 @@import { FC } from 'react'+import Router from 'next/router'import { IconChevronRight } from 'ui'import { useStore } from 'hooks'import Link from 'next/link'@@ -29,8 +30,12 @@ const ExampleProject: FC<Props> = ({ framework, title, description, url }) => {<div className="mr-4 flex flex-col"><imgclassName="transition-all group-hover:scale-110"- src={`/img/libraries/${framework.toLowerCase()}${- ['expo', 'nextjs'].includes(framework.toLowerCase()) ? (isDarkTheme ? '-dark' : '') : ''+ src={`${Router.basePath}/img/libraries/${framework.toLowerCase()}${+ ['expo', 'nextjs'].includes(framework.toLowerCase())+ ? isDarkTheme+ ? '-dark'+ : ''+ : ''}-icon.svg`}alt={`${framework} logo`}width={26}diff --git a/studio/components/interfaces/Home/NewProjectPanel/NewProjectPanel.tsx b/studio/components/interfaces/Home/NewProjectPanel/NewProjectPanel.tsxindex 5ef67552c20..35a76f438b1 100644--- a/studio/components/interfaces/Home/NewProjectPanel/NewProjectPanel.tsx+++ b/studio/components/interfaces/Home/NewProjectPanel/NewProjectPanel.tsx@@ -47,7 +47,7 @@ const NewProjectPanel: FC<Props> = ({}) => {type="default"icon={<SVG- src="/img/table-editor.svg"+ src={`${router.basePath}/img/table-editor.svg`}style={{ width: `${14}px`, height: `${14}px` }}preProcessor={(code) =>code.replace(/svg/, 'svg class="m-auto text-color-inherit"')@@ -65,7 +65,7 @@ const NewProjectPanel: FC<Props> = ({}) => {type="default"icon={<SVG- src="/img/sql-editor.svg"+ src={`${router.basePath}/img/sql-editor.svg`}style={{ width: `${14}px`, height: `${14}px` }}preProcessor={(code) =>code.replace(/svg/, 'svg class="m-auto text-color-inherit"')diff --git a/studio/components/interfaces/Organization/BillingSettings/PaymentMethods.tsx b/studio/components/interfaces/Organization/BillingSettings/PaymentMethods.tsxindex 799445695b1..1705b63f5d5 100644--- a/studio/components/interfaces/Organization/BillingSettings/PaymentMethods.tsx+++ b/studio/components/interfaces/Organization/BillingSettings/PaymentMethods.tsx@@ -1,4 +1,5 @@import { FC, useState } from 'react'+import Router from 'next/router'import {Dropdown,IconPlus,@@ -158,7 +159,7 @@ const PaymentMethods: FC<Props> = ({<div key={paymentMethod.id} className="flex items-center justify-between"><div className="flex items-center space-x-8"><img- src={`/img/payment-methods/${paymentMethod.card.brand+ src={`${Router.basePath}/img/payment-methods/${paymentMethod.card.brand.replace(' ', '-').toLowerCase()}.png`}width="32"diff --git a/studio/components/interfaces/Settings/Vault/VaultToggle.tsx b/studio/components/interfaces/Settings/Vault/VaultToggle.tsxindex 1b6647afd05..9e1468369e9 100644--- a/studio/components/interfaces/Settings/Vault/VaultToggle.tsx+++ b/studio/components/interfaces/Settings/Vault/VaultToggle.tsx@@ -1,4 +1,5 @@import Link from 'next/link'+import Router from 'next/router'import { observer } from 'mobx-react-lite'import { FC, useState } from 'react'import * as Tooltip from '@radix-ui/react-tooltip'@@ -63,8 +64,8 @@ const VaultToggle: FC<Props> = () => {backgroundSize: isNotAvailable ? '50%' : '40%',backgroundPosition: '100% 24%',backgroundImage: ui.isDarkTheme- ? 'url("/img/vault-dark.png")'- : 'url("/img/vault-light.png")',+ ? `url("${Router.basePath}/img/vault-dark.png")`+ : `url("${Router.basePath}/img/vault-light.png")`,}}><div className="w-3/5 space-y-8">diff --git a/studio/components/layouts/AccountLayout/AccountLayout.tsx b/studio/components/layouts/AccountLayout/AccountLayout.tsxindex d070b44eff8..7f627e5f9fe 100644--- a/studio/components/layouts/AccountLayout/AccountLayout.tsx+++ b/studio/components/layouts/AccountLayout/AccountLayout.tsx@@ -75,14 +75,14 @@ const AccountLayout: FC<Props> = ({ children, title, breadcrumbs }) => {links: [{isActive: router.pathname === `/account/me`,- icon: '/img/user.svg',+ icon: `${router.basePath}/img/user.svg`,label: 'Preferences',href: `/account/me`,key: `/account/me`,},{isActive: router.pathname === `/account/tokens`,- icon: '/img/user.svg',+ icon: `${router.basePath}/img/user.svg`,label: 'Access Tokens',href: `/account/tokens`,key: `/account/tokens`,@@ -97,14 +97,14 @@ const AccountLayout: FC<Props> = ({ children, title, breadcrumbs }) => {links: [{key: 'ext-guides',- icon: '/img/book.svg',+ icon: `${router.basePath}/img/book.svg`,label: 'Guides',href: 'https://supabase.com/docs',isExternal: true,},{key: 'ext-guides',- icon: '/img/book-open.svg',+ icon: `${router.basePath}/img/book-open.svg`,label: 'API Reference',href: 'https://supabase.com/docs/guides/database/api',isExternal: true,diff --git a/studio/components/layouts/DocsLayout/DocsLayout.utils.tsx b/studio/components/layouts/DocsLayout/DocsLayout.utils.tsxindex 155f14f6d57..d5262f54cff 100644--- a/studio/components/layouts/DocsLayout/DocsLayout.utils.tsx+++ b/studio/components/layouts/DocsLayout/DocsLayout.utils.tsx@@ -1,5 +1,6 @@-import { ProductMenuGroup } from 'components/ui/ProductMenu/ProductMenu.types'+import Router from 'next/router'import SVG from 'react-inlinesvg'+import { ProductMenuGroup } from 'components/ui/ProductMenu/ProductMenu.types'import { IconBook, IconBookOpen } from 'ui'export const generateDocsMenu = (@@ -71,7 +72,7 @@ export const generateDocsMenu = (url: `/project/${ref}/api/graphiql`,icon: (<SVG- src="/img/graphql.svg"+ src={`${Router.basePath}/img/graphql.svg`}style={{ width: `${16}px`, height: `${16}px` }}className="text-scale-1200"preProcessor={(code) =>diff --git a/studio/components/layouts/ProjectLayout/LayoutHeader/HelpPopover.tsx b/studio/components/layouts/ProjectLayout/LayoutHeader/HelpPopover.tsxindex fe837159d1c..0436b50b488 100644--- a/studio/components/layouts/ProjectLayout/LayoutHeader/HelpPopover.tsx+++ b/studio/components/layouts/ProjectLayout/LayoutHeader/HelpPopover.tsx@@ -83,14 +83,16 @@ const HelpPopover: FC<Props> = () => {><ImageclassName="absolute left-0 top-0 opacity-50"- src={'/img/support/discord-bg-small.jpg'}+ src={`${router.basePath}/img/support/discord-bg-small.jpg`}layout="fill"objectFit="cover"alt="discord illustration header"/><Buttontype="secondary"- icon={<SVG src={`/img/discord-icon.svg`} className="h-4 w-4" />}+ icon={+ <SVG src={`${router.basePath}/img/discord-icon.svg`} className="h-4 w-4" />+ }><span style={{ color: '#404EED' }}>Join Discord server</span></Button>@@ -106,7 +108,7 @@ const HelpPopover: FC<Props> = () => {><ImageclassName="absolute left-0 top-0 opacity-50"- src={'/img/support/github-bg.jpg?v-1'}+ src={`${router.basePath}/img/support/github-bg.jpg?v-1`}layout="fill"objectFit="cover"alt="discord illustration header"diff --git a/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.tsx b/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.tsxindex 913d8d9010d..599436d22ac 100644--- a/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.tsx+++ b/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.tsx@@ -42,7 +42,7 @@ const NavigationBar: FC<Props> = ({}) => {<Link href="/projects"><a className="block"><img- src="/img/supabase-logo.svg"+ src={`${router.basePath}/img/supabase-logo.svg`}alt="Supabase"className="mx-auto h-[40px] w-6 cursor-pointer rounded"/>diff --git a/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsx b/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsxindex 5a2c1a7bac5..478cb2bb431 100644--- a/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsx+++ b/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsx@@ -9,6 +9,7 @@ import {IconUsers,} from 'ui'import SVG from 'react-inlinesvg'+import Router from 'next/router'import { ProjectBase } from 'types'import { Route } from 'components/ui/ui.types'@@ -27,7 +28,7 @@ export const generateToolRoutes = (ref?: string, project?: ProjectBase): Route[]label: 'Table Editor',icon: (<SVG- src="/img/table-editor.svg"+ src={`${Router.basePath}/img/table-editor.svg`}style={{ width: `${18}px`, height: `${18}px` }}preProcessor={(code) => code.replace(/svg/, 'svg class="m-auto text-color-inherit"')}/>@@ -41,7 +42,7 @@ export const generateToolRoutes = (ref?: string, project?: ProjectBase): Route[]label: 'SQL Editor',icon: (<SVG- src="/img/sql-editor.svg"+ src={`${Router.basePath}/img/sql-editor.svg`}style={{ width: `${18}px`, height: `${18}px` }}preProcessor={(code) => code.replace(/svg/, 'svg class="m-auto text-color-inherit"')}/>diff --git a/studio/components/layouts/SignInLayout/ForgotPasswordLayout.tsx b/studio/components/layouts/SignInLayout/ForgotPasswordLayout.tsxindex 6e6f4ef2eb5..f77e48c1c7a 100644--- a/studio/components/layouts/SignInLayout/ForgotPasswordLayout.tsx+++ b/studio/components/layouts/SignInLayout/ForgotPasswordLayout.tsx@@ -2,6 +2,7 @@ import { useStore } from 'hooks'import { observer } from 'mobx-react-lite'import Image from 'next/image'import Link from 'next/link'+import Router from 'next/router'import { PropsWithChildren } from 'react'type ForgotPasswordLayoutProps = {@@ -31,7 +32,11 @@ const ForgotPasswordLayout = ({<Link href={logoLinkToMarketingSite ? 'https://supabase.com' : '/projects'}><a><Image- src={theme == 'dark' ? '/img/supabase-dark.svg' : '/img/supabase-light.svg'}+ src={+ theme == 'dark'+ ? `${Router.basePath}/img/supabase-dark.svg`+ : `${Router.basePath}/img/supabase-light.svg`+ }alt=""height={24}width={120}diff --git a/studio/components/layouts/SignInLayout/SignInLayout.tsx b/studio/components/layouts/SignInLayout/SignInLayout.tsxindex 4732fc96179..d22de13bcc7 100644--- a/studio/components/layouts/SignInLayout/SignInLayout.tsx+++ b/studio/components/layouts/SignInLayout/SignInLayout.tsx@@ -7,6 +7,7 @@ import { observer } from 'mobx-react-lite'import Head from 'next/head'import Image from 'next/image'import Link from 'next/link'+import Router from 'next/router'import { PropsWithChildren, useEffect, useState } from 'react'import { tweets } from 'shared-data'import { Button, IconFileText } from 'ui'@@ -94,7 +95,11 @@ const SignInLayout = ({<Link href={logoLinkToMarketingSite ? 'https://supabase.com' : '/projects'}><a><Image- src={theme == 'dark' ? '/img/supabase-dark.svg' : '/img/supabase-light.svg'}+ src={+ theme == 'dark'+ ? `${Router.basePath}/img/supabase-dark.svg`+ : `${Router.basePath}/img/supabase-light.svg`+ }alt="Supabase Logo"height={24}width={120}diff --git a/studio/components/layouts/VercelIntegrationLayout.tsx b/studio/components/layouts/VercelIntegrationLayout.tsxindex 10eb5ce6c8c..c79e44a6274 100644--- a/studio/components/layouts/VercelIntegrationLayout.tsx+++ b/studio/components/layouts/VercelIntegrationLayout.tsx@@ -1,5 +1,6 @@import { FC, ReactNode } from 'react'import Head from 'next/head'+import Router from 'next/router'import Divider from 'components/ui/Divider'interface Props {@@ -20,7 +21,11 @@ const VercelIntegrationLayout: FC<Props> = ({ children }) => {<div className="flex justify-start lg:w-0 lg:flex-1"><div><span className="sr-only">Supabase</span>- <img className="h-6 w-auto sm:h-6" src="/img/supabase-logo.svg" alt="" />+ <img+ className="h-6 w-auto sm:h-6"+ src={`${Router.basePath}/img/supabase-logo.svg`}+ alt=""+ /></div></div></div>diff --git a/studio/components/layouts/WizardLayout.tsx b/studio/components/layouts/WizardLayout.tsxindex 1fbb272dc79..0c9afd5fa5a 100644--- a/studio/components/layouts/WizardLayout.tsx+++ b/studio/components/layouts/WizardLayout.tsx@@ -1,5 +1,6 @@import { FC } from 'react'import Link from 'next/link'+import Router from 'next/router'import { IconChevronRight } from 'ui'import { withAuth, useFlag } from 'hooks'import { observer } from 'mobx-react-lite'@@ -35,7 +36,7 @@ const Header: FC<any> = ({ organization, project }) => {<Link href="/projects"><a><img- src="/img/supabase-logo.svg"+ src={`${Router.basePath}/img/supabase-logo.svg`}alt="Supabase"className="rounded border p-1 hover:border-white dark:border-dark"style={{ height: 24 }}diff --git a/studio/components/to-be-cleaned/Docs/Pages/Introduction.tsx b/studio/components/to-be-cleaned/Docs/Pages/Introduction.tsxindex 61f132b1cf1..36aad6cf3a5 100644--- a/studio/components/to-be-cleaned/Docs/Pages/Introduction.tsx+++ b/studio/components/to-be-cleaned/Docs/Pages/Introduction.tsx@@ -1,8 +1,9 @@-import Snippets from '../Snippets'-import CodeSnippet from '../CodeSnippet'import Image from 'next/image'+import Router from 'next/router'import { useStore } from 'hooks'import { AutoApiService } from 'data/config/project-api-query'+import Snippets from '../Snippets'+import CodeSnippet from '../CodeSnippet'const libs = [{@@ -64,7 +65,9 @@ export default function Introduction({ autoApiService, selectedLang }: Props) {"><Image- src={`/img/icons/reference-${isDarkTheme ? lib.icon : `${lib.icon}-light`}.svg`}+ src={`${Router.basePath}/img/icons/reference-${+ isDarkTheme ? lib.icon : `${lib.icon}-light`+ }.svg`}width={16}height={16}alt={lib.name}diff --git a/studio/components/to-be-cleaned/NoSearchResults.tsx b/studio/components/to-be-cleaned/NoSearchResults.tsxindex 1a14a9d7b3f..84f0ddc1dda 100644--- a/studio/components/to-be-cleaned/NoSearchResults.tsx+++ b/studio/components/to-be-cleaned/NoSearchResults.tsx@@ -1,10 +1,11 @@+import Router from 'next/router'import SVG from 'react-inlinesvg'export const NoSearchResults = () => {return (<div className="flex h-64 flex-col items-center justify-center"><SVG- src="/img/no-search-results.svg"+ src={`${Router.basePath}/img/no-search-results.svg`}preProcessor={(code) =>code.replace(/svg/, 'svg className="mb-2 w-16 h-16 text-color-inherit"')}diff --git a/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerColumn.js b/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerColumn.jsindex db2a5886e1b..6cf5ce73e07 100644--- a/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerColumn.js+++ b/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerColumn.js@@ -1,4 +1,5 @@import { useState, useRef, useEffect } from 'react'+import Router from 'next/router'import { get, sum } from 'lodash'import { Checkbox, IconUpload } from 'ui'import { Transition } from '@headlessui/react'@@ -221,7 +222,10 @@ const FileExplorerColumn = ({{/* Drag drop upload CTA for when column is empty */}{column.items.length === 0 && column.status !== STORAGE_ROW_STATUS.LOADING && (<div className="h-full w-full flex flex-col items-center justify-center">- <img src="/img/storage-placeholder.svg" className="opacity-75 pointer-events-none" />+ <img+ src={`${Router.basePath}/img/storage-placeholder.svg`}+ className="opacity-75 pointer-events-none"+ /><p className="my-3 opacity-75">Drop your files here</p><p className="w-40 text-center text-sm text-scale-1100">Or upload them via the "Upload file" button abovediff --git a/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerRow.tsx b/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerRow.tsxindex 7eaf41c543b..9979a78e99a 100644--- a/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerRow.tsx+++ b/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerRow.tsx@@ -1,4 +1,5 @@import { FC, useState, useRef, useEffect } from 'react'+import Router from 'next/router'import { find, has, isEmpty, isEqual } from 'lodash'import {Checkbox,@@ -41,10 +42,10 @@ const RowIcon = ({ view, status, fileType, mimeType }: any) => {if (fileType === STORAGE_ROW_TYPES.BUCKET || fileType === STORAGE_ROW_TYPES.FOLDER) {const iconSrc =fileType === STORAGE_ROW_TYPES.BUCKET- ? '/img/bucket-filled.svg'+ ? `${Router.basePath}/img/bucket-filled.svg`: fileType === STORAGE_ROW_TYPES.FOLDER- ? '/img/folder-filled.svg'- : '/img/file-filled.svg'+ ? `${Router.basePath}/img/folder-filled.svg`+ : `${Router.basePath}/img/file-filled.svg`return (<SVGsrc={iconSrc}diff --git a/studio/components/to-be-cleaned/Storage/StorageExplorer/PreviewPane.tsx b/studio/components/to-be-cleaned/Storage/StorageExplorer/PreviewPane.tsxindex 2ba600a6f83..f0ea7c89fe7 100644--- a/studio/components/to-be-cleaned/Storage/StorageExplorer/PreviewPane.tsx+++ b/studio/components/to-be-cleaned/Storage/StorageExplorer/PreviewPane.tsx@@ -11,6 +11,7 @@ import {IconChevronDown,} from 'ui'import SVG from 'react-inlinesvg'+import Router from 'next/router'import { formatBytes } from 'lib/helpers'import { Transition } from '@headlessui/react'import * as Tooltip from '@radix-ui/react-tooltip'@@ -24,7 +25,7 @@ const PreviewFile = ({ mimeType, previewUrl }: { mimeType: string; previewUrl: sif (!mimeType || !previewUrl) {return (<SVG- src={'/img/file-filled.svg'}+ src={`${Router.basePath}/img/file-filled.svg`}preProcessor={(code) =>code.replace(/svg/, 'svg class="mx-auto w-32 h-32 text-color-inherit opacity-75"')}@@ -42,7 +43,7 @@ const PreviewFile = ({ mimeType, previewUrl }: { mimeType: string; previewUrl: sreturn (<div className="flex h-full w-full flex-col items-center justify-center"><SVG- src={'/img/file-filled.svg'}+ src={`${Router.basePath}/img/file-filled.svg`}preProcessor={(code) =>code.replace(/svg/, 'svg class="mx-auto w-32 h-32 text-color-inherit opacity-75"')}@@ -85,7 +86,7 @@ const PreviewFile = ({ mimeType, previewUrl }: { mimeType: string; previewUrl: s}return (<SVG- src={'/img/file-filled.svg'}+ src={`${Router.basePath}/img/file-filled.svg`}preProcessor={(code) =>code.replace(/svg/, 'svg class="mx-auto w-32 h-32 text-color-inherit opacity-75"')}diff --git a/studio/pages/404.tsx b/studio/pages/404.tsxindex 17f0131b0f2..ea67c7812f9 100644--- a/studio/pages/404.tsx+++ b/studio/pages/404.tsx@@ -1,7 +1,8 @@import { NextPage } from 'next'import Image from 'next/image'-import { useEffect, useState } from 'react'+import Router from 'next/router'import Link from 'next/link'+import { useEffect, useState } from 'react'import { Button } from 'ui'import { useStore } from 'hooks'@@ -26,7 +27,11 @@ const Error404: NextPage = ({}) => {<div className="flex w-full items-center justify-between md:w-auto"><a href="/projects"><Image- src={theme == 'dark' ? '/img/supabase-dark.svg' : '/img/supabase-light.svg'}+ src={+ theme == 'dark'+ ? `${Router.basePath}/img/supabase-dark.svg`+ : `${Router.basePath}/img/supabase-light.svg`+ }alt="supabase"height={24}width={120}diff --git a/studio/pages/500.tsx b/studio/pages/500.tsxindex 9c5ab86c18e..ca0f728e0f3 100644--- a/studio/pages/500.tsx+++ b/studio/pages/500.tsx@@ -28,7 +28,11 @@ const Error500: NextPage = () => {<div className="flex w-full items-center justify-between md:w-auto"><a href="/projects"><Image- src={theme == 'dark' ? '/img/supabase-dark.svg' : '/img/supabase-light.svg'}+ src={+ theme == 'dark'+ ? `${router.basePath}/img/supabase-dark.svg`+ : `${router.basePath}/img/supabase-light.svg`+ }alt=""height={24}width={120}diff --git a/studio/pages/join/index.tsx b/studio/pages/join/index.tsxindex 120db3cb51b..89a7f563bb7 100644--- a/studio/pages/join/index.tsx+++ b/studio/pages/join/index.tsx@@ -240,7 +240,7 @@ const JoinOrganizationPage = () => {<Link href="/projects"><a className="flex items-center justify-center gap-4"><img- src="/img/supabase-logo.svg"+ src={`${router.basePath}/img/supabase-logo.svg`}alt="Supabase"className="block h-[24px] cursor-pointer rounded"/>diff --git a/studio/pages/new/[slug].tsx b/studio/pages/new/[slug].tsxindex 1bda54063c3..52b630ad0a2 100644--- a/studio/pages/new/[slug].tsx+++ b/studio/pages/new/[slug].tsx@@ -366,7 +366,9 @@ const Wizard: NextPageWithLayout = () => {addOnBefore={({ active, selected }: any) => (<imgclassName="w-5 rounded-sm"- src={`/img/regions/${Object.keys(availableRegions)[i]}.svg`}+ src={`${router.basePath}/img/regions/${+ Object.keys(availableRegions)[i]+ }.svg`}/>)}>diff --git a/studio/pages/org/_/[[...routeSlug]].tsx b/studio/pages/org/_/[[...routeSlug]].tsxindex 69c379f35b3..801691ae60c 100644--- a/studio/pages/org/_/[[...routeSlug]].tsx+++ b/studio/pages/org/_/[[...routeSlug]].tsx@@ -1,5 +1,5 @@import Link from 'next/link'-import { useRouter } from 'next/router'+import Router, { useRouter } from 'next/router'import { NextPage } from 'next'import { observer } from 'mobx-react-lite'import { Button, IconPlus } from 'ui'@@ -15,7 +15,7 @@ const Header = () => {<Link href="/projects"><a><img- src="/img/supabase-logo.svg"+ src={`${Router.basePath}/img/supabase-logo.svg`}alt="Supabase"className="dark:border-dark rounded border p-1 hover:border-white"style={{ height: 24 }}diff --git a/studio/pages/project/_/[[...routeSlug]].tsx b/studio/pages/project/_/[[...routeSlug]].tsxindex dacc4ed5bdb..666105d68cc 100644--- a/studio/pages/project/_/[[...routeSlug]].tsx+++ b/studio/pages/project/_/[[...routeSlug]].tsx@@ -1,7 +1,7 @@import { FC } from 'react'import Link from 'next/link'import { NextPage } from 'next'-import { useRouter } from 'next/router'+import Router, { useRouter } from 'next/router'import { observer } from 'mobx-react-lite'import { withAuth } from 'hooks'@@ -16,7 +16,7 @@ const Header: FC<Props> = () => {<Link href="/projects"><a><img- src="/img/supabase-logo.svg"+ src={`${Router.basePath}/img/supabase-logo.svg`}alt="Supabase"className="dark:border-dark rounded border p-1 hover:border-white"style={{ height: 24 }}diff --git a/studio/pages/support/new.tsx b/studio/pages/support/new.tsxindex 0197ba4c9ce..9abb20338cb 100644--- a/studio/pages/support/new.tsx+++ b/studio/pages/support/new.tsx@@ -1,5 +1,6 @@import SVG from 'react-inlinesvg'import Link from 'next/link'+import Router from 'next/router'import { useState } from 'react'import { observer } from 'mobx-react-lite'import { Button, IconLoader } from 'ui'@@ -28,7 +29,7 @@ const SupportPage = () => {<div className="space-y-12 py-8"><div className="flex justify-between items-center"><div className="flex items-center space-x-3">- <SVG src={`/img/supabase-logo.svg`} className="h-4 w-4" />+ <SVG src={`${Router.basePath}/img/supabase-logo.svg`} className="h-4 w-4" /><h1 className="m-0 text-lg">Supabase support</h1></div><div className="flex items-center space-x-3">diff --git a/studio/pages/vercel/setupProject.tsx b/studio/pages/vercel/setupProject.tsxindex 6cb30e758a8..52452be8d20 100644--- a/studio/pages/vercel/setupProject.tsx+++ b/studio/pages/vercel/setupProject.tsx@@ -317,7 +317,7 @@ const CreateProject = observer(() => {addOnBefore={({ active, selected }: any) => (<imgclassName="w-5 rounded-sm"- src={`/img/regions/${Object.keys(REGIONS)[i]}.svg`}+ src={`${router.basePath}/img/regions/${Object.keys(REGIONS)[i]}.svg`}/>)}>