Skip to content

Commit

Permalink
feat(nextjs): verified status reflected on page
Browse files Browse the repository at this point in the history
  • Loading branch information
not-ani committed Oct 14, 2024
1 parent ca9fb13 commit e5a86e8
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 11 deletions.
34 changes: 34 additions & 0 deletions apps/nextjs/public/veri.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 44 additions & 11 deletions apps/nextjs/src/app/(auth)/unverified/page.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,58 @@
/** eslint-disable @next/next/no-img-element */
import Link from "next/link";
import { Loader2 } from "lucide-react";

export default function Component() {
import { Button, buttonVariants } from "@amaxa/ui/button";

Check warning on line 5 in apps/nextjs/src/app/(auth)/unverified/page.tsx

View workflow job for this annotation

GitHub Actions / lint

'Button' is defined but never used. Allowed unused vars must match /^_/u

import { checkAuth } from "~/lib/auth";

export default async function Component() {
const auth = await checkAuth();

if (auth?.user.status === "Unverified" || auth?.user.status === "Pending") {

Check warning on line 12 in apps/nextjs/src/app/(auth)/unverified/page.tsx

View workflow job for this annotation

GitHub Actions / lint

Unnecessary optional chain on a non-nullish value

Check warning on line 12 in apps/nextjs/src/app/(auth)/unverified/page.tsx

View workflow job for this annotation

GitHub Actions / lint

Unnecessary optional chain on a non-nullish value
return (
<div className="flex min-h-screen flex-col items-center justify-center bg-gray-50 p-4 dark:bg-neutral-900">
<div className="w-full max-w-md space-y-8 text-center">
<img

Check warning on line 16 in apps/nextjs/src/app/(auth)/unverified/page.tsx

View workflow job for this annotation

GitHub Actions / lint

Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element
src="https://hebbkx1anhila5yf.public.blob.vercel-storage.com/undraw_pending_approval_xuu9-SijgfHAu6eaJd2HZssLqinPtdimNF9.svg"
alt="Pending Approval Illustration"
className="mx-auto h-64 w-64"
/>
<h1 className="text-3xl font-bold tracking-tight text-gray-900 dark:text-white">
Hang tight!
</h1>
{/* j */}
<p className="text-lg text-gray-100 dark:text-gray-600">
Your account is currently under review. We'll notify you once it's
approved.
</p>
<div className="flex items-center justify-center space-x-2 text-sm text-gray-200 dark:text-gray-500">
<Loader2 className="h-4 w-4 animate-spin" />
<span>Estimated wait time: 24-48 hours</span>
</div>
</div>
</div>
);
}

return (
<div className="flex min-h-screen flex-col items-center justify-center bg-gray-50 p-4 dark:bg-neutral-900">
<div className="w-full max-w-md space-y-8 text-center">
<img

Check warning on line 41 in apps/nextjs/src/app/(auth)/unverified/page.tsx

View workflow job for this annotation

GitHub Actions / lint

Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element
src="https://hebbkx1anhila5yf.public.blob.vercel-storage.com/undraw_pending_approval_xuu9-SijgfHAu6eaJd2HZssLqinPtdimNF9.svg"
alt="Pending Approval Illustration"
src="/veri.svg"
alt="Approved Illustration"
className="mx-auto h-64 w-64"
/>
<h1 className="text-3xl font-bold tracking-tight text-gray-900">
Hang tight!
<h1 className="text-3xl font-bold tracking-tight text-gray-900 dark:text-white">
Your account is approved!
</h1>
<p className="text-lg text-gray-600">
Your account is currently under review. We'll notify you once it's
approved.
<p className="text-lg text-gray-600 dark:text-gray-100">
Your account is now approved and you can start using Amaxa.
</p>
<div className="flex items-center justify-center space-x-2 text-sm text-gray-500">
<Loader2 className="h-4 w-4 animate-spin" />
<span>Estimated wait time: 24-48 hours</span>
<div className="pt-4">
<Link href="/" className={buttonVariants({ variant: "primary" })}>
<span>Go to Home</span>
</Link>
</div>
</div>
</div>
Expand Down

0 comments on commit e5a86e8

Please sign in to comment.