Ghost/ghost/members-auth-pages/app.js
Fabien O'Carroll fd07779c1e Renamed index.js to app.js
no-issue

This is so when requiring the module we don't require a preact app in
2019-05-07 17:15:50 +02:00

25 lines
582 B
JavaScript

import './styles/members.css';
import {Component} from 'preact';
import MembersProvider from './components/MembersProvider';
import Modal from './components/Modal';
export default class App extends Component {
constructor() {
super();
const apiUrl = window.location.href.substring(0, window.location.href.indexOf('/members/auth'));
this.state = {
apiUrl
};
}
render() {
return (
<MembersProvider apiUrl={ this.state.apiUrl }>
<Modal />
</MembersProvider>
);
}
}