XaSuMu/imports/ui/Logout.tsx
2024-11-20 22:56:22 +01:00

20 lines
334 B
TypeScript

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