fix(ar1): companyId letto da chosenCompanyId (pattern Imieibandi)
Ar1Home usava 'getUser()?.companyId' che non esiste nello store. Il pattern
corretto è useStoreValue('chosenCompanyId') come in src/pages/Imieibandi/index.js
e negli altri moduli beneficiario.
This commit is contained in:
@@ -31,8 +31,7 @@ const VARIANT_OPTIONS = [
|
|||||||
const Ar1Home = () => {
|
const Ar1Home = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const toast = useRef(null);
|
const toast = useRef(null);
|
||||||
const user = useStoreValue('getUser');
|
const companyId = useStoreValue('chosenCompanyId');
|
||||||
const companyId = user?.companyId;
|
|
||||||
|
|
||||||
const [status, setStatus] = useState(null);
|
const [status, setStatus] = useState(null);
|
||||||
const [history, setHistory] = useState([]);
|
const [history, setHistory] = useState([]);
|
||||||
|
|||||||
Reference in New Issue
Block a user