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