diff --git a/frontend/src/scripts/index.js b/frontend/src/scripts/index.js index 9736804..b79d895 100644 --- a/frontend/src/scripts/index.js +++ b/frontend/src/scripts/index.js @@ -16,7 +16,6 @@ class Main extends Component { constructor(props) { super(props); this.state = { - files: [], text: "", status: "", faq: false, @@ -35,6 +34,9 @@ class Main extends Component { fetch(addr_prefix + "/api/photos").then(resp => resp.json()).then(json => { this.setState({photos: json}) }) + fetch(addr_prefix + "/api/login_status").then(resp => resp.json()).then(json => { + this.setState({login_status: json}) + }) if(window.location.search){ let searchParams = new URLSearchParams(window.location.search); for(const [key, value] of searchParams){ @@ -62,9 +64,6 @@ class Main extends Component { onHashChange(event){ this.setState({page: window.location.hash, gallery_open: undefined}) } - handleChangeFiles(event) { - this.setState({files: [...event.target.files]}) - } onSubmit(event){ event.preventDefault(); let form = document.getElementById("form"); @@ -153,6 +152,11 @@ class Main extends Component {