u
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
||||
import { auth, company } from '../api';
|
||||
|
||||
export const bootstrapSession = createAsyncThunk('auth/bootstrap', async () => auth.me());
|
||||
export const bootstrapSession = createAsyncThunk('auth/bootstrap', async (session) => {
|
||||
if (session) return session;
|
||||
return auth.me();
|
||||
});
|
||||
|
||||
export const loginWithGoogle = createAsyncThunk('auth/login', async (credential) => {
|
||||
const { session } = await auth.loginWithGoogle(credential);
|
||||
|
||||
Reference in New Issue
Block a user