XaSuMu/imports/ui/Logout.tsx
2024-11-21 11:23:47 +01:00

20 lines
317 B
TypeScript

import React from 'react';
import { Meteor } from 'meteor/meteor';
import { useUserId } from 'meteor/react-meteor-accounts';
export const Logout = () => {
const userId = useUserId();
if (!userId) {
return null;
}
Meteor.logout();
return (
<div>
<h1>See you later!</h1>
</div>
);
};