Skip to content

Commit 6db250d

Browse files
committed
remove register another account button after sending confirmation email
1 parent 878783e commit 6db250d

File tree

3 files changed

+24
-13
lines changed

3 files changed

+24
-13
lines changed

index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,17 @@
146146
}(window.location))
147147
</script>
148148

149+
<!-- Twitter conversion tracking base code -->
150+
<script>
151+
!function(e,t,n,s,u,a){e.twq||(s=e.twq=function(){s.exe?s.exe.apply(s,arguments):s.queue.push(arguments);
152+
},s.version='1.1',s.queue=[],u=t.createElement(n),u.async=!0,u.src='https://static.ads-twitter.com/uwt.js',
153+
a=t.getElementsByTagName(n)[0],a.parentNode.insertBefore(u,a))}(window,document,'script');
154+
twq('config','ql07b');
155+
</script>
156+
<!-- End Twitter conversion tracking base code -->
157+
158+
159+
149160
<!-- GitHub OAuth redirect handler -->
150161
<script type="text/javascript">
151162
// Handle GitHub OAuth redirect for TradingGoose.github.io

public/screen-shot.png

3.41 KB
Loading

src/pages/RegisterPage.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ import { Loader2, UserPlus, AlertCircle, ArrowLeft, Mail, CheckCircle, Eye, EyeO
99
import { useAuth } from "@/lib/auth";
1010
import { supabase } from "@/lib/supabase";
1111

12+
declare global {
13+
interface Window {
14+
twq?: (...args: unknown[]) => void;
15+
}
16+
}
17+
1218
export default function RegisterPage() {
1319
const navigate = useNavigate();
1420
const { register, isAuthenticated } = useAuth();
@@ -34,6 +40,13 @@ export default function RegisterPage() {
3440
}
3541
}, [isAuthenticated, navigate]);
3642

43+
useEffect(() => {
44+
if (successMessage && typeof window !== 'undefined' && typeof window.twq === 'function') {
45+
// Fire Twitter conversion event when confirmation modal is shown
46+
window.twq('event', 'tw-ql07b-ql07b', {});
47+
}
48+
}, [successMessage]);
49+
3750
const handleRegister = async (e: React.FormEvent) => {
3851
e.preventDefault();
3952
setError("");
@@ -140,19 +153,6 @@ export default function RegisterPage() {
140153
>
141154
Go to Login
142155
</Button>
143-
<Button
144-
variant="ghost"
145-
className="w-full"
146-
onClick={() => {
147-
setSuccessMessage("");
148-
setUsername("");
149-
setEmail("");
150-
setPassword("");
151-
setConfirmPassword("");
152-
}}
153-
>
154-
Register Another Account
155-
</Button>
156156
</CardFooter>
157157
</Card>
158158
</div>

0 commit comments

Comments
 (0)