Skip to content

Commit

Permalink
feat: 🎸 redirect when init finished
Browse files Browse the repository at this point in the history
  • Loading branch information
ZingerLittleBee committed Apr 27, 2024
1 parent 76c1e2a commit 1f48473
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
13 changes: 6 additions & 7 deletions apps/hub/app/auth/signin/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use client'

import { useState } from 'react'
import Link from 'next/link'
import { signIn } from 'next-auth/react'

import { Button } from '@/components/ui/button'
Expand Down Expand Up @@ -76,12 +75,12 @@ export default function SignInPage() {
Login
</Button>
</div>
<div className="mt-4 text-center text-sm">
Don&apos;t have an account?{' '}
<Link href="#" className="underline">
Sign up
</Link>
</div>
{/*<div className="mt-4 text-center text-sm">*/}
{/* Don&apos;t have an account?{' '}*/}
{/* <Link href="#" className="underline">*/}
{/* Sign up*/}
{/* </Link>*/}
{/*</div>*/}
</CardContent>
</Card>
</div>
Expand Down
5 changes: 2 additions & 3 deletions apps/hub/app/init/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ export default function InitPage() {
if (!shouldRender) return <>Loading...</>

const onSubmit = async () => {
console.log('username', username)
console.log('password', password)
if (!username || !password) {
toast({
variant: 'destructive',
Expand All @@ -60,6 +58,7 @@ export default function InitPage() {
toast({
title: 'Account created',
})
router.push('/')
} else {
toast({
variant: 'destructive',
Expand All @@ -69,7 +68,7 @@ export default function InitPage() {
}

return (
<Card className="max-w-[400px]">
<Card className="w-[380px]">
<CardHeader>
<CardTitle>Create Account</CardTitle>
<CardDescription>
Expand Down

0 comments on commit 1f48473

Please sign in to comment.