mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-18 16:01:40 +03:00
497934bb6a
no-issue Preact was having issues when the entrypoint wasn't named index.js
25 lines
582 B
JavaScript
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>
|
|
);
|
|
}
|
|
}
|