Skip to content

Commit

Permalink
Refactor authentication flow + update sign-in, sign-out & user compon…
Browse files Browse the repository at this point in the history
…ents
  • Loading branch information
pheralb committed Mar 19, 2024
1 parent 142658c commit cf07d7b
Show file tree
Hide file tree
Showing 23 changed files with 115 additions and 1,195 deletions.
7 changes: 0 additions & 7 deletions src/app/(auth)/auth-error/page.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions src/app/(auth)/login/page.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions src/app/(auth)/new-password/page.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions src/app/(auth)/register/page.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions src/app/(auth)/reset/page.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions src/app/(auth)/verify/page.tsx

This file was deleted.

10 changes: 5 additions & 5 deletions src/components/auth/error.tsx → src/app/auth/error/page.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import Link from "next/link";
import { sharedAnimationCards } from "@/components/auth/animation-cards";
import { Card, CardContent, CardHeader, CardTitle } from "@/ui/card";
import { sharedAnimationCards } from "./animation-cards";
import Link from "next/link";

const AuthError = () => {
const AuthErrorPage = () => {
return (
<Card className={sharedAnimationCards}>
<CardHeader>
<CardTitle className="text-xl">Something went wrong.</CardTitle>
</CardHeader>
<CardContent>
<Link
href="/login"
href="/auth"
className="opacity-75 transition-opacity duration-100 hover:text-black hover:opacity-100 dark:hover:text-white"
>
<span>Back to login</span>
Expand All @@ -20,4 +20,4 @@ const AuthError = () => {
);
};

export default AuthError;
export default AuthErrorPage;
File renamed without changes.
20 changes: 20 additions & 0 deletions src/app/auth/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Card, CardContent, CardHeader, CardTitle } from "@/ui/card";
import { cn } from "@/utils";

import { sharedAnimationCards } from "@/components/auth/animation-cards";
import SocialLogin from "@/components/auth/social-login";

const AuthLoginPage = () => {
return (
<Card className={cn(sharedAnimationCards)}>
<CardHeader>
<CardTitle className="text-xl">Hey friend! Welcome back 👋</CardTitle>
</CardHeader>
<CardContent className="dark:bg-neutral-900">
<SocialLogin />
</CardContent>
</Card>
);
};

export default AuthLoginPage;
127 changes: 0 additions & 127 deletions src/components/auth/newPassword.tsx

This file was deleted.

Loading

0 comments on commit cf07d7b

Please sign in to comment.