Skip to content

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

Remove as properly from Link components

Joshen Lim237fb90eb083
diff --git a/studio/components/interfaces/Home/ProjectUsage.tsx b/studio/components/interfaces/Home/ProjectUsage.tsx
index 4470eef6696..a45dcebac84 100644
--- a/studio/components/interfaces/Home/ProjectUsage.tsx
+++ b/studio/components/interfaces/Home/ProjectUsage.tsx
@@ -26,7 +26,7 @@ const ProjectUsage: FC<Props> = ({ project }) => {
const { data, error }: any = useSWR(
// only fetch when browser window is active
`${API_URL}/projects/${ref}/log-stats`,
- get,
+ get
// increase refresh rate x10 to 30s when focus lost
// conditional fetching will cause cached data to clear (not desirable)
// { refreshInterval: isActive ? 3000 : 30000 }
@@ -46,8 +46,7 @@ const ProjectUsage: FC<Props> = ({ project }) => {
<PanelHeader
icon={<IconDatabase size="small" />}
title="Database"
- href={'/project/[ref]/editor/table'}
- as={`/project/${ref}/editor/table`}
+ href={`/project/${ref}/editor/table`}
/>
<ChartHandler
startDate={startDate}
@@ -73,8 +72,7 @@ const ProjectUsage: FC<Props> = ({ project }) => {
<PanelHeader
icon={<IconKey size="small" />}
title="Auth"
- href={'/project/[ref]/auth/users'}
- as={`/project/${ref}/auth/users`}
+ href={`/project/${ref}/auth/users`}
/>
<ChartHandler
startDate={startDate}
@@ -100,8 +98,7 @@ const ProjectUsage: FC<Props> = ({ project }) => {
<PanelHeader
icon={<IconArchive size="small" />}
title="Storage"
- href={'/project/[ref]/storage/buckets'}
- as={`/project/${ref}/storage/buckets`}
+ href={`/project/${ref}/storage/buckets`}
/>
<ChartHandler
startDate={startDate}
@@ -157,7 +154,7 @@ export default ProjectUsage
const PanelHeader = (props: any) => {
const Tag = props?.href ? Link : 'div'
return (
- <Tag href={props.href} as={props.as}>
+ <Tag href={props.href}>
<div
className={
'flex items-center space-x-3 opacity-80 ' +
diff --git a/studio/components/layouts/AccountLayout/WithSidebar.tsx b/studio/components/layouts/AccountLayout/WithSidebar.tsx
index c9ec89d0e4b..d51262c1521 100644
--- a/studio/components/layouts/AccountLayout/WithSidebar.tsx
+++ b/studio/components/layouts/AccountLayout/WithSidebar.tsx
@@ -116,7 +116,6 @@ const LinksWithoutHeaders: FC<any> = ({ links, subitems, subitemsParentKey }) =>
isActive={isActive}
label={x.label}
href={x.href}
- as={x.as}
onClick={x.onClick}
external={x.external || false}
/>
@@ -145,7 +144,7 @@ const LinksWithoutHeaders: FC<any> = ({ links, subitems, subitemsParentKey }) =>
const SidebarItem: FC<any> = ({ id, label, as, href, isActive, isSubitem, onClick, external }) => {
return (
- <Link href={href || ''} as={as || ''}>
+ <Link href={href || ''}>
<a className="block" target={external ? '_blank' : '_self'}>
<Menu.Item
rounded
diff --git a/studio/components/layouts/ProjectLayout/LayoutHeader/LayoutHeader.tsx b/studio/components/layouts/ProjectLayout/LayoutHeader/LayoutHeader.tsx
index 25ecc09d1ce..c2e5fecc408 100644
--- a/studio/components/layouts/ProjectLayout/LayoutHeader/LayoutHeader.tsx
+++ b/studio/components/layouts/ProjectLayout/LayoutHeader/LayoutHeader.tsx
@@ -38,7 +38,7 @@ const LayoutHeader = ({ customHeaderComponents, breadcrumbs = [], headerBorder =
</>
) : (
<Typography.Text small className="mx-2">
- <Link as="/" href="/">
+ <Link href="/">
<a
className={`block px-2 py-1 focus:outline-none focus:bg-transparent cursor-pointer dark:hover:text-white`}
>
diff --git a/studio/components/to-be-cleaned/Auth/PolicySelection.js b/studio/components/to-be-cleaned/Auth/PolicySelection.js
index aa24958b57a..e79bd3780cb 100644
--- a/studio/components/to-be-cleaned/Auth/PolicySelection.js
+++ b/studio/components/to-be-cleaned/Auth/PolicySelection.js
@@ -57,7 +57,6 @@ const PolicySelection = ({
target="_blank"
className="text-green-400"
href="https://supabase.com/docs/guides/auth#policies"
- as="https://supabase.com/docs/guides/auth#policies"
>
here
</a>