UNPKG

@inertiapixel/nextjs-auth

Version:

Authentication system for Next.js. Supports credentials and social login, JWT token management, and lifecycle hooks — designed to integrate with nodejs-auth for full-stack MERN apps.

11 lines (10 loc) 338 B
'use client'; import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime"; import { useAuth } from '../../hooks/useAuth'; const SignedIn = ({ children }) => { const { user, loading } = useAuth(); if (loading || !user) return null; return _jsx(_Fragment, { children: children }); }; export default SignedIn;