Skip to content

Instantly share code, notes, and snippets.

@alieslamifard
Created March 24, 2020 10:19
Show Gist options
  • Save alieslamifard/22e8aff6a0ddcc09285271778b62cef2 to your computer and use it in GitHub Desktop.
Save alieslamifard/22e8aff6a0ddcc09285271778b62cef2 to your computer and use it in GitHub Desktop.
import React from 'react';
import withPrivateRoute from '../components/withPrivateRoute';
const Dashboard = () => {
return <div>This is a Dashboard page which is private.</div>;
};
Dashboard.getInitialProps = async props => {
console.info('##### Congratulations! You are authorized! ######', props);
return {};
};
export default withPrivateRoute(Dashboard);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment