-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98 from Full-Stack-Collective/dj/adjust-routes
Initial routes adjustment
- Loading branch information
Showing
13 changed files
with
132 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
...app/appointment/[practiceCode]/layout.tsx → src/app/[practiceCode]/layout.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,17 @@ | ||
import Hero from '@/components/Hero'; | ||
import Features from '@/components/Features'; | ||
import { createServerComponentClient } from '@supabase/auth-helpers-nextjs'; | ||
import { cookies } from 'next/headers'; | ||
import { redirect } from 'next/navigation'; | ||
|
||
import { ADMIN_PORTAL_FEATURES } from '@/lib/constants'; | ||
const Login = async () => { | ||
const supabase = createServerComponentClient<Database>({ cookies }); | ||
|
||
const Admin = () => { | ||
const getHeroTitle = () => ( | ||
<> | ||
An{' '} | ||
<span className="w-full text-transparent bg-clip-text bg-gradient-to-r from-blue-400 to-rose-500"> | ||
Efficient Appointment Management System | ||
</span>{' '} | ||
to empower Healthcare Administrators | ||
</> | ||
); | ||
const { | ||
data: { session }, | ||
} = await supabase.auth.getSession(); | ||
|
||
const heroSubtitle = | ||
'Empowers healthcare providers and administrators with a powerful tool to efficiently manage and oversee all requested appointments in one centralized location. Simplify your appointment management process and enhance productivity with our comprehensive and intuitive dashboard.'; | ||
|
||
const heroCalloutBtn = { | ||
text: 'Get Started', | ||
link: '/admin/unauthenticated', | ||
}; | ||
|
||
return ( | ||
<> | ||
<Hero | ||
title={getHeroTitle()} | ||
subtitle={heroSubtitle} | ||
calloutBtn={heroCalloutBtn} | ||
/> | ||
<Features features={ADMIN_PORTAL_FEATURES} /> | ||
</> | ||
); | ||
if (session) { | ||
redirect('/admin/dashboard'); | ||
} else redirect('/admin/login'); | ||
}; | ||
|
||
export default Admin; | ||
export default Login; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import Image from 'next/image'; | ||
import React from 'react'; | ||
|
||
export default function AppointmentHeader({ | ||
practiceName, | ||
practiceLogo, | ||
}: { | ||
practiceName: string; | ||
practiceLogo: string | null; | ||
}) { | ||
return ( | ||
<header className="bg-background"> | ||
<div className="m-auto max-w-7xl w-full px-4 flex flex-col sm:flex-row justify-between items-center relative"> | ||
{practiceLogo && ( | ||
<Image | ||
src={practiceLogo} | ||
width={160} | ||
height={160} | ||
alt={`Logo for a dental practice called ${practiceName}`} | ||
/> | ||
)} | ||
{practiceName ? ( | ||
<h1 className="text-2xl font-semibold text-slate-600"> | ||
{practiceName} | ||
</h1> | ||
) : null} | ||
</div> | ||
</header> | ||
); | ||
} |
Oops, something went wrong.