diff --git a/src/blog/components/Profile.tsx b/src/blog/components/Profile.tsx index ddaf023..6ee65e4 100644 --- a/src/blog/components/Profile.tsx +++ b/src/blog/components/Profile.tsx @@ -17,7 +17,7 @@ interface ProfileProps { } export default function Profile({ onBack }: ProfileProps) { - const { currentUser, loading, error, token, refreshAuthors, updateProfile } = useAuth(); + const { currentUser, loading, error, logout, updateProfile } = useAuth(); const [formData, setFormData] = React.useState({ username: currentUser?.username || '', name: currentUser?.name || '', @@ -56,6 +56,10 @@ export default function Profile({ onBack }: ProfileProps) { } }; + const handleLogout = async () => { + logout() + } + if (!currentUser) { return ( {saving ? : 'Save Changes'} + ); }