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>
  );
};
