Skip to content

Commit

Permalink
fix: issue #26
Browse files Browse the repository at this point in the history
  • Loading branch information
warmachine028 committed Sep 4, 2024
1 parent de2af5c commit 6f448cf
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions client/src/app/(auth)/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ export const metadata: Metadata = { title: 'Log In' }

const LogIn = () => {
return (
<div className="bg-card flex h-full max-h-[40rem] overflow-hidden rounded-2xl shadow-2xl md:min-w-[64rem]">
<div className="bg-card flex max-h-[40rem] w-full overflow-hidden rounded-2xl shadow-2xl sm:h-full md:min-w-[64rem]">
<Image src={hero} priority alt="log-in" className="hidden w-1/2 object-cover md:block" />

<div className="w-full space-y-10 overflow-y-auto md:w-1/2 md:p-10">
<div className="space-y-1 text-center">
<h1 className="text-3xl font-bold">Welcome Back!</h1>
</div>
<div className="space-y-5">
<div className="space-y-5 px-5">
<LogInForm />
<h6 className="block text-center">
Don&apos;t have an account?{' '}
Expand Down
4 changes: 2 additions & 2 deletions client/src/app/(auth)/signup/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ export const metadata: Metadata = { title: 'Sign Up' }

const SignUp = () => {
return (
<div className="bg-card flex h-full max-h-[40rem] overflow-hidden rounded-2xl shadow-2xl md:min-w-[64rem]">
<div className="bg-card flex max-h-[40rem] w-full overflow-hidden rounded-2xl shadow-2xl sm:h-full md:min-w-[64rem]">
<div className="w-full space-y-10 overflow-y-auto md:w-1/2 md:p-10">
<div className="space-y-1 text-center">
<h1 className="text-3xl font-bold">Join Us Now</h1>
<p className="text-muted-foreground">
A place where even <span className="italic">programmers</span> can find a frend
</p>
</div>
<div className="space-y-5">
<div className="space-y-5 px-5">
<SignUpForm />
<h6 className="block text-center">
Already have an account?{' '}
Expand Down
1 change: 0 additions & 1 deletion client/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export const metadata: Metadata = {
}

// TODO: shadcn-ui/toast
// TODO: fix issue https://github.com/warmachine028/next-book/issues/26
const RootLayout = ({ children }: Readonly<{ children: React.ReactNode }>) => {
return (
//? FIX: https://github.com/shadcn-ui/ui/issues/1906#issuecomment-1807426212
Expand Down
11 changes: 10 additions & 1 deletion client/src/components/forms/SignUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,13 @@ const SignUpForm = () => {
<FormItem>
<FormLabel>Username</FormLabel>
<FormControl>
<Input autoComplete="username" placeholder="eg: pritamKunduC24" {...field} />
<Input
pattern="^[a-zA-Z0-9_-]+$"
autoComplete="username"
placeholder="eg: pritamKunduC24"
title="Enter your username"
{...field}
/>
</FormControl>
{useFormState().errors.userName ? (
<FormMessage />
Expand All @@ -57,6 +63,7 @@ const SignUpForm = () => {
<FormLabel>Email</FormLabel>
<FormControl>
<Input
title="Enter your email"
autoComplete="email"
placeholder="eg: [email protected]"
type="email"
Expand All @@ -79,6 +86,8 @@ const SignUpForm = () => {
<FormLabel>Password</FormLabel>
<FormControl>
<PasswordInput
title="Enter your password"
minLength={8}
autoComplete="new-password"
placeholder="eg: 1@$abShadC23"
type="password"
Expand Down

1 comment on commit 6f448cf

@vercel
Copy link

@vercel vercel bot commented on 6f448cf Sep 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.