Skip to content

Commit

Permalink
fix: remove index from login page
Browse files Browse the repository at this point in the history
  • Loading branch information
arikchakma committed Feb 21, 2024
1 parent 686f531 commit 1d6cb58
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
12 changes: 12 additions & 0 deletions apps/web/app/(auth)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
import { cookies } from 'next/headers';
import { redirect } from 'next/navigation';
import { createServerComponentClient } from '@supabase/auth-helpers-nextjs';
import type { Metadata } from 'next';

export const dynamic = 'force-dynamic';

interface AuthLayoutProps {
children: React.ReactNode;
}

export const metadata: Metadata = {
robots: {
index: false,
follow: false,
googleBot: {
index: false,
follow: false,
},
},
};

export default async function AuthLayout(props: AuthLayoutProps) {
const { children } = props;
const supabase = createServerComponentClient({ cookies });
Expand Down
18 changes: 17 additions & 1 deletion apps/web/app/(auth)/login/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
import NextLink from 'next/link';
import type { Metadata } from 'next';
import { buttonVariants } from '@/components/ui/button';
import { GithubLoginButton } from '@/components/auth/github-login-button';
import { cn } from '@/utils/classname';
import { GoogleLoginButton } from '@/components/auth/google-login-button';
import { EmailLoginForm } from '@/components/auth/email-login-form';

export const metadata = {
export const metadata: Metadata = {
title: 'Login - Maily',
description: 'Login to your Maily account.',
openGraph: {
siteName: 'Maily',
title: 'Login - Maily',
description: 'Login to your Maily account.',
type: 'website',
url: 'https://maily.to',
locale: 'en-US',
images: {
url: '/og-image.png',
width: 1200,
height: 630,
alt: 'Maily Preview',
},
},
};

export default function LoginPage() {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export default function LandingPage() {
<div className="bg-black py-8 text-white">
<div className="mx-auto max-w-[1050px] px-7 sm:px-10">
<p className="text-center text-lg text-white">
MIT Licensed © 2023
MIT Licensed © 2024
<span className="mx-3 hidden sm:inline-block">·</span>
<a
className="hidden items-center hover:text-red-300 sm:inline-flex"
Expand Down
4 changes: 2 additions & 2 deletions apps/web/next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {}
const nextConfig = {};

module.exports = nextConfig
module.exports = nextConfig;

0 comments on commit 1d6cb58

Please sign in to comment.