Skip to content

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

Changes button htmltype, changes page to route validate

Terry Sutton3ba4ccc22932
diff --git a/studio/components/interfaces/App/RouteValidationWrapper.tsx b/studio/components/interfaces/App/RouteValidationWrapper.tsx
index 39441b63a05..a0cac70e50f 100644
--- a/studio/components/interfaces/App/RouteValidationWrapper.tsx
+++ b/studio/components/interfaces/App/RouteValidationWrapper.tsx
@@ -23,7 +23,7 @@ const RouteValidationWrapper: FC = ({ children }) => {
// or prompt the user to create an organaization
// this is used by database.dev, usually as /new/new-project
'/new/[slug]',
- '/org/[slug]/join',
+ '/join',
]
/**
diff --git a/studio/pages/join/index.tsx b/studio/pages/join/index.tsx
index 3f41a06c6ff..f39a5f0f066 100644
--- a/studio/pages/join/index.tsx
+++ b/studio/pages/join/index.tsx
@@ -33,10 +33,6 @@ const User = () => {
invite_id,
} = tokenValidationInfo || {}
- console.log(slug, token)
- console.log('tokenValidationInfo', tokenValidationInfo)
- console.log('tokenInfoLoaded', tokenInfoLoaded)
-
useEffect(() => {
let cancel = false
@@ -97,7 +93,7 @@ const User = () => {
<Link
passHref
href={`/?next=${encodeURIComponent(
- `/join/?token=${router.query.token}&slug=${router.query.slug}`
+ `/join?token=${router.query.token}&slug=${router.query.slug}`
)}`}
>
<Button as="a">Sign in / Sign up</Button>
@@ -137,21 +133,11 @@ const User = () => {
{authorized_user && !expired_token && email_match && tokenInfoLoaded && (
<div className="flex items-center gap-2">
- <Button
- onClick={handleJoinOrganization}
- htmlType="submit"
- loading={isSubmitting}
- size="small"
- >
+ <Button onClick={handleJoinOrganization} loading={isSubmitting} size="small">
Join this organization
</Button>
- <Button
- onClick={handleDeclineJoinOrganization}
- htmlType="submit"
- size="small"
- type="text"
- >
+ <Button onClick={handleDeclineJoinOrganization} size="small" type="text">
Decline
</Button>
</div>