Skip to content

Commit

Permalink
add metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
flamekiller22 committed Jan 10, 2024
1 parent aec547f commit 0e4645b
Show file tree
Hide file tree
Showing 21 changed files with 47 additions and 7 deletions.
2 changes: 0 additions & 2 deletions app/(protected)/admin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import { RoleGate } from "@/components/auth/role-gate";
import { FormSuccess } from "@/components/form-success";
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader } from "@/components/ui/card";

import { useCurrentRole } from "@/hooks/use-current-role";
import { toast } from "sonner";

const AdminPage = () => {
Expand Down
5 changes: 5 additions & 0 deletions app/(protected)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { Navbar } from "./_components/navbar";
import type { Metadata } from 'next';

interface ProtectedLayoutProps {
children: React.ReactNode
}

export const metadata: Metadata = {
title: 'Dashboard - Flame Auth',
}

const ProtectedLayout = ({ children }: ProtectedLayoutProps) => {
return (
<div className="h-full w-full flex flex-col gap-y-10 items-center justify-center bg-[radial-gradient(ellipse_at_top,_var(--tw-gradient-stops))] from-sky-400 to-blue-800">
Expand Down
2 changes: 2 additions & 0 deletions app/(protected)/settings/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ const SettingsPage = () => {
});

const onSubmit = (values: z.infer<typeof SettingsSchema>) => {
setError(undefined);
setSuccess(undefined);
startTransition(() => {
settings(values)
.then((data) => {
Expand Down
5 changes: 5 additions & 0 deletions app/auth/error/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { ErrorCard } from "@/components/auth/error-card";
import type { Metadata } from 'next';

export const metadata: Metadata = {
title: 'Error - Flame Auth',
}

const AuthErrorPage = () => {
return (
Expand Down
5 changes: 5 additions & 0 deletions app/auth/login/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { LoginForm } from "@/components/auth/login-form";
import type { Metadata } from 'next';

export const metadata: Metadata = {
title: 'Login - Flame Auth',
}

const LoginPage = () => {
return (
Expand Down
5 changes: 5 additions & 0 deletions app/auth/new-password/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { NewPasswordForm } from "@/components/auth/new-password-form";
import type { Metadata } from 'next';

export const metadata: Metadata = {
title: 'New Password - Flame Auth',
}

const NewPasswordPage = () => {
return (
Expand Down
5 changes: 5 additions & 0 deletions app/auth/new-verification/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { NewVerificationForm } from "@/components/auth/new-verification-form";
import type { Metadata } from 'next';

export const metadata: Metadata = {
title: 'New Verification - Flame Auth',
}

const NewVerificationPage = () => {
return (
Expand Down
5 changes: 5 additions & 0 deletions app/auth/register/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { RegisterForm } from "@/components/auth/register-form";
import type { Metadata } from 'next';

export const metadata: Metadata = {
title: 'Register - Flame Auth',
}

const RegisterPage = () => {
return (
Expand Down
5 changes: 5 additions & 0 deletions app/auth/reset/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { ResetForm } from "@/components/auth/reset-form";
import type { Metadata } from 'next';

export const metadata: Metadata = {
title: 'Reset - Flame Auth',
}

const ResetPage = () => {
return (
Expand Down
Binary file removed app/favicon.ico
Binary file not shown.
10 changes: 8 additions & 2 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ import { Toaster } from '@/components/ui/sonner'
const inter = Inter({ subsets: ['latin'] })

export const metadata: Metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
title: 'Flame Auth',
description: 'Authentication Library using Authjs and Nextjs',
icons: [
{ rel: "apple-touch-icon", sizes: "180x180", url: "/apple-touch-icon.png" },
{ rel: "icon", type: "image/png", sizes: "32x32", url: "/apple-touch-icon.png" },
{ rel: "icon", type: "image/png", sizes: "16x16", url: "/apple-touch-icon.png" },
{ rel: "manifest", url: "/site.webmanifest" },
]
}

export default async function RootLayout({
Expand Down
2 changes: 1 addition & 1 deletion components/auth/login-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { login } from "@/actions/login";
export const LoginForm = () => {
const searchParams = useSearchParams();
const callbackUrl = searchParams.get("callbackUrl");
const urlError = searchParams.get("error") === "OAuthAccountNotLinked" ? "Email already in use with different provider" : "";
const urlError = searchParams.get("error") ? (searchParams.get("error") === "OAuthAccountNotLinked" ? "Email already in use with different provider" : "Something went wrong") : "";

const [showTwoFactor, setShowTwoFactor] = useState(false);
const [error, setError] = useState<string | undefined>("");
Expand Down
Binary file added public/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon.ico
Binary file not shown.
1 change: 0 additions & 1 deletion public/next.svg

This file was deleted.

1 change: 1 addition & 0 deletions public/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
1 change: 0 additions & 1 deletion public/vercel.svg

This file was deleted.

0 comments on commit 0e4645b

Please sign in to comment.