nice updates are happening with multiple users tuning in

This commit is contained in:
talksik
2022-05-14 11:25:33 -05:00
parent 03c4ea3aaa
commit 8b7b07479e
2 changed files with 14 additions and 14 deletions
+2 -2
View File
@@ -42,8 +42,8 @@
[ [
"@electron-forge/plugin-webpack", "@electron-forge/plugin-webpack",
{ {
"port": "4001", "port": "4005",
"loggerPort": "9002", "loggerPort": "9005",
"mainConfig": "./webpack.main.config.js", "mainConfig": "./webpack.main.config.js",
"devContentSecurityPolicy": "connect-src 'self' http://localhost:5000 ws://localhost:5000 https://api.quotable.io/random 'unsafe-eval'", "devContentSecurityPolicy": "connect-src 'self' http://localhost:5000 ws://localhost:5000 https://api.quotable.io/random 'unsafe-eval'",
"renderer": { "renderer": {
+12 -12
View File
@@ -19,19 +19,19 @@ export function AuthProvider({ children }: { children: React.ReactNode }) {
const [userFetchState, fetchUser] = useAsyncFn(getUserDetails); const [userFetchState, fetchUser] = useAsyncFn(getUserDetails);
// ! REMOVING FOR TESTING MULTIPLE CLIENTS // ! REMOVING FOR TESTING MULTIPLE CLIENTS
useEffect(() => { // useEffect(() => {
// on load of this, if we already have jwt tokens in store, // // on load of this, if we already have jwt tokens in store,
// then try using them with auth check // // then try using them with auth check
window.electronAPI.store.get(STORE_ITEMS.AUTH_SESSION_JWT).then((jwtToken: string) => { // window.electronAPI.store.get(STORE_ITEMS.AUTH_SESSION_JWT).then((jwtToken: string) => {
if (jwtToken) { // if (jwtToken) {
setJwtToken(jwtToken); // setJwtToken(jwtToken);
console.log('retrieved jwtToken from storage', jwtToken); // console.log('retrieved jwtToken from storage', jwtToken);
} else { // } else {
console.log('no jwt token in store'); // console.log('no jwt token in store');
} // }
}); // });
}, []); // }, []);
useEffect(() => { useEffect(() => {
if (jwtToken) { if (jwtToken) {