pl-fe: migrate auth reducer to mutative

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-11-11 12:47:00 +01:00
parent 865130c55a
commit 09ef91cfc8
7 changed files with 165 additions and 155 deletions

View File

@@ -40,7 +40,7 @@ type IMenuItem = {
const getOtherAccounts = createSelector([
(state: RootState) => state.auth.users,
(state: RootState) => state.entities[Entities.ACCOUNTS]?.store,
], (signedAccounts, accountEntities) => signedAccounts.toArray().map(([_, { id }]) => accountEntities?.[id] as AccountEntity).filter(account => account));
], (signedAccounts, accountEntities) => Object.values(signedAccounts).map(({ id }) => accountEntities?.[id] as AccountEntity).filter(account => account));
const ProfileDropdown: React.FC<IProfileDropdown> = ({ account, children }) => {
const dispatch = useAppDispatch();