Skip to content

Commit c33d704

Browse files
committed
cc
1 parent 1cf141e commit c33d704

File tree

4 files changed

+104
-9
lines changed

4 files changed

+104
-9
lines changed

app/(auth)/auth/error/page.tsx

+31-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
1+
import { RxExclamationTriangle } from 'react-icons/rx'
2+
import { Button } from '@nextui-org/button'
3+
import { Spotlight } from '@/components/ui/Spotlight'
14
const page = ({ searchParams }: { searchParams: { error: string } }) => {
2-
return <div>{JSON.stringify(searchParams)}</div>
5+
console.log()
6+
if (searchParams.error === 'Configuration') {
7+
return (
8+
<div className="">
9+
<div className="h-screen w-full rounded-md flex md:items-center md:justify-center bg-black/[0.96] antialiased bg-grid-white/[0.02] relative overflow-hidden">
10+
<Spotlight
11+
className="-top-40 left-0 md:left-60 md:-top-20"
12+
fill="white"
13+
/>
14+
<div className=" p-4 max-w-7xl mx-auto relative z-10 w-full pt-20 md:pt-0">
15+
<h1 className="text-4xl md:text-7xl font-bold text-center bg-clip-text text-transparent bg-gradient-to-b from-neutral-50 to-neutral-400 bg-opacity-50">
16+
Configuration <br />
17+
Error
18+
</h1>
19+
<p className="mt-4 font-normal text-base text-neutral-300 max-w-lg text-center mx-auto">
20+
We are sorry, but there was an error with the configuration of the
21+
email. Please try again later.
22+
</p>
23+
<div className="mx-auto w-fit pt-10">
24+
<Button>Go Back</Button>
25+
</div>
26+
</div>
27+
</div>
28+
</div>
29+
)
30+
}
31+
32+
return <p>hello</p>
333
}
434

535
export default page

app/(auth)/signin/action.ts

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
'use server'
22
import { signIn } from '@/auth'
3-
import { redirect } from 'next/navigation'
3+
44
export const signInWithGitHub = async () => {
55
await signIn('github')
66
}
77

88
export const signInWithMagicLink = async (formData: FormData) => {
9-
console.log('first')
109
await signIn('resend', formData)
11-
if (error) {
12-
redirect('/signin?message=Not Valid Login credentials')
13-
}
14-
redirect('/')
1510
}

components/ui/Spotlight.tsx

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import cn from '@/lib/utils/cn'
2+
import React from 'react'
3+
4+
type SpotlightProps = {
5+
className?: string
6+
fill?: string
7+
}
8+
9+
export const Spotlight = ({ className, fill }: SpotlightProps) => {
10+
return (
11+
<svg
12+
className={cn(
13+
'animate-spotlight pointer-events-none absolute z-[1] h-[169%] w-[138%] lg:w-[84%] opacity-0',
14+
className,
15+
)}
16+
xmlns="http://www.w3.org/2000/svg"
17+
viewBox="0 0 3787 2842"
18+
fill="none"
19+
>
20+
<g filter="url(#filter)">
21+
<ellipse
22+
cx="1924.71"
23+
cy="273.501"
24+
rx="1924.71"
25+
ry="273.501"
26+
transform="matrix(-0.822377 -0.568943 -0.568943 0.822377 3631.88 2291.09)"
27+
fill={fill || 'white'}
28+
fillOpacity="0.21"
29+
></ellipse>
30+
</g>
31+
<defs>
32+
<filter
33+
id="filter"
34+
x="0.860352"
35+
y="0.838989"
36+
width="3785.16"
37+
height="2840.26"
38+
filterUnits="userSpaceOnUse"
39+
colorInterpolationFilters="sRGB"
40+
>
41+
<feFlood floodOpacity="0" result="BackgroundImageFix"></feFlood>
42+
<feBlend
43+
mode="normal"
44+
in="SourceGraphic"
45+
in2="BackgroundImageFix"
46+
result="shape"
47+
></feBlend>
48+
<feGaussianBlur
49+
stdDeviation="151"
50+
result="effect1_foregroundBlur_1065_8"
51+
></feGaussianBlur>
52+
</filter>
53+
</defs>
54+
</svg>
55+
)
56+
}

tailwind.config.js

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
const {nextui} = require("@nextui-org/react");
2-
1+
const { nextui } = require('@nextui-org/react')
32

43
module.exports = {
54
content: [
@@ -30,6 +29,21 @@ module.exports = {
3029
textOpacity: ['dark'],
3130
backgroundColor: ['checked'],
3231
borderColor: ['checked'],
32+
animation: {
33+
spotlight: 'spotlight 2s ease .75s 1 forwards',
34+
},
35+
keyframes: {
36+
spotlight: {
37+
'0%': {
38+
opacity: 0,
39+
transform: 'translate(-72%, -62%) scale(0.5)',
40+
},
41+
'100%': {
42+
opacity: 1,
43+
transform: 'translate(-50%,-40%) scale(1)',
44+
},
45+
},
46+
},
3347
},
3448
},
3549
plugins: [

0 commit comments

Comments
 (0)