improvement: account setting added to header in order to choose organizations/subscribtions/etc
This commit is contained in:
@@ -218,7 +218,13 @@ export function AuthProvider({ children }: { children: React.ReactNode }) {
|
||||
|
||||
localStorage.setItem('currentOrganizationId', organization.id);
|
||||
|
||||
setCurrentOrganization(organization);
|
||||
setCurrentOrganization({
|
||||
id: organization.id,
|
||||
name: organization.name,
|
||||
type: organization.type as Organization['type'],
|
||||
isOwner: Boolean((organization as { isOwner?: boolean }).isOwner),
|
||||
plan: (organization as { plan?: Organization['plan'] }).plan,
|
||||
});
|
||||
|
||||
router.push('/today');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user