Ross
Ross
CCConvex Community
Created by Ross on 4/26/2024 in #support-community
What is the best way to do session management with CLERK + CONVEX?
heeey buddy! Thanks a lot for your reply! So... Today I am checking in that way on my (layout.tsx): 'use client' import { Spinner } from '@/components/ui/spinner' import { useConvexAuth } from 'convex/react' import { redirect } from 'next/navigation' const MainLayout = ({ children }: { children: React.ReactNode }) => { const { isAuthenticated, isLoading } = useConvexAuth() if (isLoading) { return ( <div className="flex min-h-screen w-full items-center justify-center bg-black"> <Spinner color={'white'} size={'lg'} /> </div> ) } if (!isAuthenticated) { return redirect('/') } return ( <> <div className="flex h-full dark:bg-[#1F1F1F]"> <main className="h-full flex-1 overflow-y-auto">{children}</main> </div> </> ) } export default MainLayout =========================================================================== Is that right?? 🥹
7 replies
CCConvex Community
Created by fawwaz on 10/11/2023 in #support-community
How to use react-email & Resend to send email through convex action
I tried to implement, but it's not working well. Can you help me?
38 replies