Skip to content

Instantly share code, notes, and snippets.

@TM818
Last active January 21, 2021 05:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TM818/a77380d6a43bb1bb1d1e9e3458c5b7df to your computer and use it in GitHub Desktop.
Save TM818/a77380d6a43bb1bb1d1e9e3458c5b7df to your computer and use it in GitHub Desktop.
function PM_Navigation() {
let location = useLocation();
return (
<div style={styles.fill}>
<ul style={styles.nav}>
<li style={styles.navItem}>
<Link to="/notifications">Notifications</Link>
</li>
<li style={styles.navItem}>
<Link to="/power">Power</Link>
</li>
</ul>
<Switch>
<Route path="/notifications">
<Notifications />
</Route>
<Route path="/power">
<PowerButton />
</Route>
</Switch>
</div>
);
}
function PowerButton(props) {
let w = remote.getCurrentWindow();
w.close();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment