localization, context, react stuff
This commit is contained in:
@@ -53,7 +53,12 @@ export default class API {
|
||||
}
|
||||
|
||||
async logout() {
|
||||
return this.apiCall("user/logout");
|
||||
const res = await this.apiCall("user/logout");
|
||||
if (res.success) {
|
||||
this.loggedIn = false;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
async getUser(id) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import {createContext, useCallback, useState} from "react";
|
||||
|
||||
const LocaleContext = React.createContext(null);
|
||||
const LocaleContext = createContext(null);
|
||||
|
||||
function LocaleProvider(props) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user