Skip to content

Commit

Permalink
chore: hide bug report form (#388)
Browse files Browse the repository at this point in the history
  • Loading branch information
NoamGaash authored Jan 16, 2024
1 parent 8f43ef6 commit dde15c7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
33 changes: 26 additions & 7 deletions src/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
} from '@ant-design/icons'
import { MainRoute } from './MainRoute'
import { ErrorPage } from 'src/pages/ErrorPage'
import { Spin } from 'antd'

export const PAGES = [
{
Expand Down Expand Up @@ -73,22 +74,42 @@ export const PAGES = [
icon: <InfoCircleOutlined />,
element: <About />,
},
{
label: 'donate_title',
path: 'https://www.jgive.com/new/he/ils/donation-targets/3268#donation-modal',
icon: <DollarOutlined />,
element: null,
},
]

const HIDDEN_PAGES = [
{
label: 'data-research',
path: '/data-research',
icon: <InfoCircleOutlined />,
element: <DataResearch />,
},
{
label: 'report_a_bug_title',
path: 'report-a-bug',
icon: <BugOutlined />,
element: <BugReportForm />,
},
{
label: 'donate_title',
path: 'https://www.jgive.com/new/he/ils/donation-targets/3268#donation-modal',
icon: <DollarOutlined />,
element: null,
label: 'release',
path: '/release',
icon: <InfoCircleOutlined />,
element: (
<>
<Spin />
<iframe src="https://noam-gaash.co.il/databus/" />
</>
),
},
]

const getRoutesList = () => {
const pages = PAGES
const pages = PAGES.concat(HIDDEN_PAGES)
const RedirectToDashboard = () => <Navigate to={pages[0].path} replace />
const routes = pages.filter((r) => r.element)
return (
Expand All @@ -109,8 +130,6 @@ const getRoutesList = () => {
return gtfs_route
}}
/>
<Route path="data-research" element={<DataResearch />} />
<Route path="release" element={<iframe src="https://noam-gaash.co.il/databus/" />} />
<Route path="*" element={<RedirectToDashboard />} key="back" />
</Route>
// </Suspense>
Expand Down
1 change: 0 additions & 1 deletion tests/menu.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ test('menu', async ({ page }) => {
'מפה בזמן אמת',
'מפה לפי קו',
'אודות',
'דיווח על באג',
'לתרומות',
]
await expect(page.locator('ul > li a')).toContainText(menuItemsInOrder)
Expand Down

0 comments on commit dde15c7

Please sign in to comment.