From 8fd285be03e1c5094e07f1d24ea7d4069a3e3075 Mon Sep 17 00:00:00 2001 From: Prudent Bird Date: Thu, 25 Jul 2024 12:52:19 +0100 Subject: [PATCH 1/2] fixed register route module not found --- public/images/{goggle.svg => google.svg} | 0 src/app/(auth-routes)/register/page.tsx | 12 ++++-------- src/components/layouts/navbar/index.tsx | 2 -- 3 files changed, 4 insertions(+), 10 deletions(-) rename public/images/{goggle.svg => google.svg} (100%) diff --git a/public/images/goggle.svg b/public/images/google.svg similarity index 100% rename from public/images/goggle.svg rename to public/images/google.svg diff --git a/src/app/(auth-routes)/register/page.tsx b/src/app/(auth-routes)/register/page.tsx index ce3b5aa33..5d50ba109 100644 --- a/src/app/(auth-routes)/register/page.tsx +++ b/src/app/(auth-routes)/register/page.tsx @@ -23,6 +23,8 @@ import { InputOTPGroup, InputOTPSlot, } from "~/components/ui/input-otp"; +import Google from "../../../../public/images/google.svg"; +import Facebook from "../../../../public/images/facebook.svg"; const formSchema = z.object({ fullname: z.string().min(2, { @@ -53,14 +55,8 @@ const SignUp = () => {

- - + +
diff --git a/src/components/layouts/navbar/index.tsx b/src/components/layouts/navbar/index.tsx index 37337b742..352c464dd 100644 --- a/src/components/layouts/navbar/index.tsx +++ b/src/components/layouts/navbar/index.tsx @@ -15,8 +15,6 @@ const navlinks = [ const Navbar = ({ is_auth_path = false }: { is_auth_path?: boolean }) => { const [scrolling, setIsScrolling] = useState(false); - // - const handleScrollEvent = () => { if (window.scrollY > 1) { setIsScrolling(true); From ce0ce2e387bca88825558e23836ebdfd5868ba58 Mon Sep 17 00:00:00 2001 From: Vxrcel Date: Thu, 25 Jul 2024 12:52:54 +0100 Subject: [PATCH 2/2] auth --- src/app/(auth-routes)/login/page.tsx | 4 +- src/app/favicon.ico | Bin 39535 -> 1003 bytes src/components/card/user-card.tsx | 92 ++++++++++++++++++++++++ src/components/layouts/navbar/index.tsx | 8 ++- src/hooks/user/use-user.ts | 4 +- src/lib/services/session.ts | 1 + 6 files changed, 102 insertions(+), 7 deletions(-) create mode 100644 src/components/card/user-card.tsx diff --git a/src/app/(auth-routes)/login/page.tsx b/src/app/(auth-routes)/login/page.tsx index 5de3c9d0b..8d1200af9 100644 --- a/src/app/(auth-routes)/login/page.tsx +++ b/src/app/(auth-routes)/login/page.tsx @@ -23,6 +23,7 @@ import { FormMessage, } from "~/components/ui/form"; import { Input } from "~/components/ui/input"; +import { useUser } from "~/hooks/user/use-user"; import { simulateDelay } from "~/lib/utils"; const loginSchema = z.object({ @@ -53,6 +54,7 @@ const LoginPage = () => { const searchP = useSearchParams(); const callback_url = searchP.get("callbackUrl"); const [isLoading, startTransition] = useTransition(); + const { updateUser } = useUser(); const form = useForm({ resolver: zodResolver(loginSchema), @@ -68,7 +70,7 @@ const LoginPage = () => { startTransition(async () => { await simulateDelay(3); await loginUser(values); - + updateUser({ email: values.email, name: values.email.split("@")[0] }); if (callback_url) { router.push(callback_url); } else { diff --git a/src/app/favicon.ico b/src/app/favicon.ico index 4570eb8d9269ad58b17fecbec6d630cded56f507..de1787396fb5c9de79973ca2617822da2aedb27e 100644 GIT binary patch literal 1003 zcmVLebwRq9VlY>&tF{CRKQdov}<$jHdZ$jBIm7}WUZ<-KC=Bv+s~ z^5oCG`RP;29KCuV>6m0(ztdZ%tvhcIo6+`}L7i`F=RN1NqBu^dg74RqGR}!EQ7(Ab zg$PX^4sPG`bOX2%B4AN9l72h)M`H@7jV1IV=F!i}N zjJeI<9u8i#{olrY#l$l1`D{*33t8Z?fl{h4M^w^|qXcsi)klHx>D=~-*~fJg?TsDJ z^C$&U6S)L+Bt#jf2o4B@%t1T%c9ZBMAyDCbZOL_w=nBMsB#WftuFI}l#o+g-J@|2u zLWt@UrHW(`>z0HyYOq#m$Za1Ynyhszupo1Rg*X!gi?-0_e)7B~S;VTyrNzYx+^t8T z88|an{}OFs%C!bP2g|K!A=V&p-L^o3HIbNu5(3LTjY8Cpv|b-3E(F3FI5a3Ftj$SS zY$ej<@9geAj}tfy6P3vl)e`F~D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z8gfP`L%}&XnRiS@!rGK$vHs)(IS5GQ8MX(03fzrjs*?#4 z54tSti6CfYYKLrpfv?10^RG}_!GBSU_RStbt@{E;oIL<0n4s5Y+~N)PCw{I(f7}_; zEP;I|EEpFh9Xxwo5v_lhjuLG?FwIRF)}1D&SLW#MYcE^?Uj|KrI0|5u#BG^w@>HW5 l#`JGjT2VCQKBy&!+avXpR|1Bm1Aq0ZuBx#Tx&1b<{|~G@=I{Uj diff --git a/src/components/card/user-card.tsx b/src/components/card/user-card.tsx new file mode 100644 index 000000000..517cb2d81 --- /dev/null +++ b/src/components/card/user-card.tsx @@ -0,0 +1,92 @@ +import { TooltipArrow, TooltipPortal } from "@radix-ui/react-tooltip"; +import { motion } from "framer-motion"; +import { usePathname } from "next/navigation"; +import { useMemo, useState } from "react"; + +import { deleteUserCookie } from "~/actions/login"; +import { useUser } from "~/hooks/user/use-user"; +import { cn } from "~/lib/utils"; +import { Button } from "../ui/button"; +import { + Tooltip, + TooltipContent, + TooltipProvider, + TooltipTrigger, +} from "../ui/tooltip"; + +const generateTailwindBGs = () => { + const colors = [ + "bg-red-500", + "bg-orange-500", + "bg-yellow-500", + "bg-green-500", + "bg-teal-500", + "bg-blue-500", + "bg-indigo-500", + "bg-purple-500", + "bg-pink-500", + ]; + const randomColor = colors[Math.floor(Math.random() * colors.length)]; + return randomColor; +}; + +const UserCard = ({ email }: { email: string }) => { + const { updateUser } = useUser(); + const [bgColor, setBgColor] = useState("bg-red-500"); + const pathname = usePathname(); + + useMemo(() => { + if (pathname === "/") { + setBgColor(generateTailwindBGs()); + } + }, [pathname]); + + return ( +
+ + + + + + + + + + + + + + + +
+ ); +}; + +export default UserCard; diff --git a/src/components/layouts/navbar/index.tsx b/src/components/layouts/navbar/index.tsx index c1df39fe7..07a0677ef 100644 --- a/src/components/layouts/navbar/index.tsx +++ b/src/components/layouts/navbar/index.tsx @@ -4,7 +4,9 @@ import { BellIcon, Menu, User } from "lucide-react"; import Link from "next/link"; import { useEffect, useState } from "react"; +import UserCard from "~/components/card/user-card"; import Logo from "~/components/common/logo"; +import { useUser } from "~/hooks/user/use-user"; const navlinks = [ { route: "Home", link: "/" }, @@ -14,6 +16,7 @@ const navlinks = [ const Navbar = ({ is_auth_path = false }: { is_auth_path?: boolean }) => { const [scrolling, setIsScrolling] = useState(false); + const { user } = useUser(); // @@ -33,9 +36,7 @@ const Navbar = ({ is_auth_path = false }: { is_auth_path?: boolean }) => { }); return (