mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 12:38:36 +00:00
Bug/typo/style fixes and some minor improvements
This commit is contained in:
@@ -26,7 +26,7 @@ export const OrgProvider = ({ children }: Props): JSX.Element => {
|
||||
// memorize the workspace details for the context
|
||||
const value = useMemo<TOrgContext>(
|
||||
() => ({
|
||||
org: userOrgs,
|
||||
orgs: userOrgs,
|
||||
currentOrg: (userOrgs || []).find(({ _id }) => _id === currentWsOrgID),
|
||||
isLoading
|
||||
}),
|
||||
@@ -36,10 +36,10 @@ export const OrgProvider = ({ children }: Props): JSX.Element => {
|
||||
return <OrgContext.Provider value={value}>{children}</OrgContext.Provider>;
|
||||
};
|
||||
|
||||
export const useOrgnization = () => {
|
||||
export const useOrganization = () => {
|
||||
const ctx = useContext(OrgContext);
|
||||
if (!ctx) {
|
||||
throw new Error('useOrgnization to be used within <OrgContext.Provider>');
|
||||
throw new Error('useOrganization to be used within <OrgContext.Provider>');
|
||||
}
|
||||
|
||||
return ctx;
|
||||
|
||||
@@ -1 +1 @@
|
||||
export { OrgProvider, useOrgnization } from './OrganizationContext';
|
||||
export { OrgProvider, useOrganization } from './OrganizationContext';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export { AuthProvider } from './AuthContext';
|
||||
export { OrgProvider, useOrgnization } from './OrganizationContext';
|
||||
export { OrgProvider, useOrganization } from './OrganizationContext';
|
||||
export { SubscriptionProvider, useSubscription } from './SubscriptionContext';
|
||||
export { UserProvider, useUser } from './UserContext';
|
||||
export { useWorkspace, WorkspaceProvider } from './WorkspaceContext';
|
||||
|
||||
Reference in New Issue
Block a user