Skip to content

Commit

Permalink
Revert "botcom redirect + copy fix" (tldraw#5265)
Browse files Browse the repository at this point in the history
Reverts tldraw#5264
  • Loading branch information
ds300 authored Jan 23, 2025
1 parent 5f514ab commit 58ae248
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions apps/dotcom/client/src/pages/tla-opt-in.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
import { SignUpButton, useAuth } from '@clerk/clerk-react'
import { useLocation } from 'react-router-dom'
import { TlaButton } from '../tla/components/TlaButton/TlaButton'
import { F } from '../tla/utils/i18n'

export function Component() {
const { isSignedIn, isLoaded } = useAuth()
const location = useLocation()
if (isSignedIn) {
// redirect to home page once the user is signed in
window.location.href = window.location.origin
return null
}
if (!isLoaded) return null
const url = `${window.location.origin}${location.pathname}`
return (
<div
style={{
Expand All @@ -30,7 +27,7 @@ export function Component() {
<F defaultMessage="Try the new tldraw (preview)" />
</h2>
<p style={{ maxWidth: 400 }}>
<F defaultMessage="Sign up to access the preview version of tldraw.com, which adds file management and collaboration features." />
<F defaultMessage="Sign in to access the preview version of tldraw.com, which adds file management and collaboration features." />
</p>
<div style={{ display: 'flex', gap: 10 }}>
<TlaButton
Expand All @@ -43,10 +40,8 @@ export function Component() {
</TlaButton>
<SignUpButton
mode="modal"
fallbackRedirectUrl={url}
forceRedirectUrl={url}
signInForceRedirectUrl={url}
signInFallbackRedirectUrl={url}
forceRedirectUrl={location.pathname}
signInForceRedirectUrl={location.pathname}
>
<TlaButton data-testid="tla-opt-in">
<F defaultMessage="Sign up" />
Expand Down

0 comments on commit 58ae248

Please sign in to comment.