This commit is contained in:
seb
2026-07-31 08:34:51 +02:00
parent a95b7f4b1e
commit 797ea59bed
24 changed files with 1151 additions and 130 deletions

View File

@@ -1,10 +1,15 @@
import { Component } from 'react';
import { connect } from 'react-redux';
import { enqueueSnackbar } from 'notistack';
import { bootstrapSession } from '../store/authSlice';
import { bootstrapSession as bootstrapSessionThunk } from '../store/authSlice';
let sessionBootstrapped = false;
class AuthBootstrap extends Component {
componentDidMount() {
if (sessionBootstrapped) return;
sessionBootstrapped = true;
this.props
.bootstrapSession()
.unwrap()
@@ -24,7 +29,7 @@ class AuthBootstrap extends Component {
}
const mapDispatchToProps = (dispatch) => ({
bootstrapSession: () => dispatch(bootstrapSession()),
bootstrapSession: () => dispatch(bootstrapSessionThunk()),
});
export default connect(null, mapDispatchToProps)(AuthBootstrap);