-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
58485df
commit d2ea4e8
Showing
27 changed files
with
544 additions
and
55 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import React from 'react' | ||
|
||
export default function ChatPage() { | ||
return ( | ||
<div> | ||
Damn! bro can't you even wait for my wings? | ||
</div> | ||
) | ||
} |
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,2 +1 @@ | ||
export { GET, POST } from "@/lib/auth/auth"; | ||
export const runtime = "edge"; |
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,16 @@ | ||
import { NextResponse } from "next/server"; | ||
import { auth } from "@/lib/auth/auth"; | ||
|
||
export async function GET() { | ||
try { | ||
const session = await auth(); | ||
if (session) { | ||
return NextResponse.json({ user: session.user }); | ||
} else { | ||
return NextResponse.json({ user: null }, { status: 401 }); | ||
} | ||
} catch (error) { | ||
console.error("Error in fetching session:", error); | ||
return NextResponse.json({ error: "Internal Server Error" }, { status: 500 }); | ||
} | ||
} |
Binary file not shown.
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,23 @@ | ||
"use client" | ||
import { signIn } from "next-auth/react" | ||
import { Button } from '@/components/ui/button'; | ||
import { IconBrandGithub, IconBrandGoogle } from '@tabler/icons-react'; | ||
import React from 'react' | ||
|
||
function LoginWithGoogle() { | ||
return ( | ||
<Button onClick={() => signIn("google")}> | ||
<IconBrandGoogle className='size-5 mr-2'/> Continue with Google | ||
</Button> | ||
) | ||
} | ||
|
||
function LoginWithGitHub() { | ||
return ( | ||
<Button onClick={() => signIn("github")}> | ||
<IconBrandGithub className='size-5 mr-2'/> Continue with GitHub | ||
</Button> | ||
) | ||
} | ||
|
||
export {LoginWithGoogle, LoginWithGitHub}; |
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,43 @@ | ||
import React from 'react' | ||
import { | ||
Dialog, | ||
DialogContent, | ||
DialogDescription, | ||
DialogHeader, | ||
DialogTrigger, | ||
} from "@/components/ui/dialog" | ||
import { Button } from '@/components/ui/button'; | ||
import { LogIn } from 'lucide-react'; | ||
import Image from 'next/image'; | ||
import { LoginWithGitHub, LoginWithGoogle } from './auth.btns'; | ||
|
||
interface AuthDialogProps { | ||
open: boolean; | ||
onOpenChange: (open: boolean) => void; | ||
} | ||
export default function AuthDialog({ open, onOpenChange }: AuthDialogProps) { | ||
return ( | ||
<Dialog open={open} onOpenChange={onOpenChange}> | ||
<DialogTrigger> | ||
<Button className='rounded-md'> | ||
<LogIn className='mr-2 size-4' />Logon | ||
</Button> | ||
</DialogTrigger> | ||
<DialogContent> | ||
<DialogHeader> | ||
<div className='flex items-center justify-start gap-20 flex-row'> | ||
<Image src="/assets/acter-logo.jpg" width={100} height={100} alt='logo' className='flex items-center justify-center rounded-xl'/> | ||
<div className='flex flex-col items-center justify-between'> | ||
<LoginWithGitHub/> | ||
<span className='text-muted-foreground font-[family-name:var(--font-geist-semi-bold)]'>OR</span> | ||
<LoginWithGoogle/> | ||
</div> | ||
</div> | ||
<DialogDescription> | ||
Continue to Acter with any of the given providers. By using Acter you agree to follow our <a href='/legal/agreement' className='hover:underline cursor-pointer font-bold'>Terms</a> and <a href='/legal/privacy-policy' className='hover:underline cursor-pointer font-bold'>Policy</a>. | ||
</DialogDescription> | ||
</DialogHeader> | ||
</DialogContent> | ||
</Dialog> | ||
) | ||
} |
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,26 @@ | ||
import { ReactNode } from "react"; | ||
|
||
import { cn } from "@/lib/utils"; | ||
|
||
export default function AnimatedGradientText({ | ||
children, | ||
className, | ||
}: { | ||
children: ReactNode; | ||
className?: string; | ||
}) { | ||
return ( | ||
<div | ||
className={cn( | ||
"group relative mx-auto flex max-w-fit flex-row items-center justify-center rounded-2xl bg-white/40 px-4 py-1.5 text-sm font-medium shadow-[inset_0_-8px_10px_#8fdfff1f] backdrop-blur-sm transition-shadow duration-500 ease-out [--bg-size:300%] hover:shadow-[inset_0_-5px_10px_#8fdfff3f] dark:bg-black/40", | ||
className, | ||
)} | ||
> | ||
<div | ||
className={`absolute inset-0 block h-full w-full animate-gradient bg-gradient-to-r from-[#ffaa40]/50 via-[#9c40ff]/50 to-[#ffaa40]/50 bg-[length:var(--bg-size)_100%] p-[1px] ![mask-composite:subtract] [border-radius:inherit] [mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)]`} | ||
/> | ||
|
||
{children} | ||
</div> | ||
); | ||
} |
Oops, something went wrong.