Skip to content

Commit

Permalink
clients/nav: rename account section to org
Browse files Browse the repository at this point in the history
  • Loading branch information
emilwidlund committed Aug 6, 2024
1 parent cb16af0 commit 8f9acc0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { Face } from '@mui/icons-material'
import { useContext } from 'react'
import { NavigationContainer } from './NavigationContainer'
import {
useAccountRoutes,
useCommunityRoutes,
useFundingRoutes,
useGeneralRoutes,
useOrganizationRoutes,
} from './navigation'

const MaintainerNavigation = () => {
Expand All @@ -18,7 +18,7 @@ const MaintainerNavigation = () => {
const generalRoutesList = useGeneralRoutes(org)
const fundingRoutes = useFundingRoutes(org)
const communityRoutes = useCommunityRoutes(org)
const accountRoutes = useAccountRoutes(org)
const organizationRoutes = useOrganizationRoutes(org)

if (!org) {
return <></>
Expand All @@ -33,7 +33,7 @@ const MaintainerNavigation = () => {
routes={communityRoutes}
dummyRoutes={[{ title: 'Audience', icon: <Face fontSize="inherit" /> }]}
/>
<NavigationContainer title="Account" routes={accountRoutes} />
<NavigationContainer title="Organization" routes={organizationRoutes} />
</div>
)
}
Expand Down
8 changes: 4 additions & 4 deletions clients/apps/web/src/components/Dashboard/navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ export const useCommunityRoutes = (
return useResolveRoutes(communityRoutesList, org, allowAll)
}

export const useAccountRoutes = (
export const useOrganizationRoutes = (
org: Organization,
allowAll?: boolean,
): RouteWithActive[] => {
return useResolveRoutes(accountRoutesList, org, allowAll)
return useResolveRoutes(organizationRoutesList, org, allowAll)
}

export const useBackerRoutes = (): RouteWithActive[] => {
Expand Down Expand Up @@ -262,7 +262,7 @@ const dashboardRoutesList = (org: Organization): Route[] => [
...generalRoutesList(org),
...fundingRoutesList(org),
...communityRoutesList(org),
...accountRoutesList(org),
...organizationRoutesList(org),
]

const backerRoutesList = (): Route[] => [
Expand Down Expand Up @@ -347,7 +347,7 @@ const orgFinanceSubRoutesList = (org: Organization): SubRoute[] => [
},
]

const accountRoutesList = (org: Organization): Route[] => [
const organizationRoutesList = (org: Organization): Route[] => [
{
id: 'finance',
title: 'Finance',
Expand Down

0 comments on commit 8f9acc0

Please sign in to comment.