mirror of
https://github.com/kingomarnajjar/gatsby-starter-netlify-cms.git
synced 2026-07-25 22:27:24 +10:00
remove package
This commit is contained in:
parent
2d131ca353
commit
c3bea9228e
1 changed files with 0 additions and 2 deletions
|
|
@ -5,10 +5,8 @@ import Helmet from 'react-helmet';
|
|||
export default class IndexPage extends React.Component {
|
||||
componentDidMount() {
|
||||
if (window.netlifyIdentity) {
|
||||
console.log('Listener added');
|
||||
window.netlifyIdentity.on('init', user => {
|
||||
if (!user) {
|
||||
console.log('Redirect to admin');
|
||||
window.netlifyIdentity.on('login', () => {
|
||||
document.location.href = '/admin/';
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue