Source

ui/pages/SignoutPage.tsx

import { Meteor } from 'meteor/meteor';
import React from 'react';
import { Header } from 'semantic-ui-react';
import LandingNavBarContainer from '../components/landing/LandingNavBar';

/** After the user clicks the "SignoutPage" link in the NavBar, log them out and display this page. */
const SignoutPage: React.FC = () => {
  Meteor.logout(function callback(error) {
    if (error) {
      console.error('Error logging out ', error);
    } else {
      localStorage.setItem('logoutEvent', 'true');
    }
  });
  return (
    <div id="signout-page">
      <LandingNavBarContainer currentUser={undefined} />
      <Header as="h2" textAlign="center">
        <p>You are signed out.</p>
      </Header>
    </div>
  );
};

export default SignoutPage;