UNPKG

membros-react-sdk

Version:

React authentication library for Membros platform with subscription management and plan-based access control

11 lines 689 B
"use client"; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useAuth } from "../AuthContext.esm.js"; export function Profile({ className }) { const { user, isAuthenticated } = useAuth(); if (!isAuthenticated || !user) { return null; } return (_jsxs("div", { className: className, children: [user.picture && (_jsx("img", { src: user.picture, alt: user.name, style: { width: 40, height: 40, borderRadius: '50%' } })), _jsxs("div", { children: [_jsxs("h3", { children: ["Hello ", user.name] }), _jsx("p", { children: user.email }), user.plano && _jsxs("p", { children: ["Plan: ", user.plano] })] })] })); } //# sourceMappingURL=Profile.js.map