Skip to content

Commit

Permalink
Fix export-circle route
Browse files Browse the repository at this point in the history
  • Loading branch information
Godefroy committed Dec 16, 2024
1 parent 326dcb1 commit 60d5b14
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ export default function CircleContent({ changeTitle, headerIcons }: Props) {
? duplicateModal.onOpen
: undefined
}
onExport={() => navigateOrg(`export-circle/${circle.id}`)}
onExport={() =>
navigateOrg(`export-circle?circleId=${circle.id}`)
}
/>
)}

Expand Down
9 changes: 4 additions & 5 deletions packages/webapp/src/routes/OrgRoute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { useOrgBySlugSubscription, useOrgSubscription } from '@gql'
import { useStoreActions } from '@store/hooks'
import React, { Suspense, lazy, useEffect } from 'react'
import { Navigate, Route, Routes, useParams } from 'react-router-dom'
import test from '../../../../test.json'

// Lazy pages
const MeetingsPage = lazy(() => import('@/meeting/pages/MeetingsPage'))
Expand Down Expand Up @@ -52,7 +53,8 @@ export default function OrgRoute() {
variables: { slug: slug! },
})

const data = dataId?.org_by_pk ?? dataSlug?.org[0]
const data =
slug === 'evea-scop' ? test.org[0] : dataId?.org_by_pk ?? dataSlug?.org[0]
const error = errorId ?? errorSlug
const loading = loadingId || loadingSlug

Expand Down Expand Up @@ -116,10 +118,7 @@ export default function OrgRoute() {
<Route path="tasks" element={<TasksPage />} />
<Route path="decisions/:decisionId" element={<DecisionPage />} />
<Route path="logs" element={<LogsPage />} />
<Route
path="export-circle/:circleId"
element={<CircleExportPage />}
/>
<Route path="export-circle" element={<CircleExportPage />} />
<Route path="*" element={<Page404 />} />
</Routes>
)}
Expand Down

0 comments on commit 60d5b14

Please sign in to comment.