Files
nowdatabase/frontend/src/pages/ProjectPage.tsx
T
juhanikatandGitHub e9fa3e3b31 Improve loading times by splitting pages.tsx into smaller files and improving the locality map (#1224)
* split pages.tsx into multiple files, and update ui e2e test since occurrence rename

* reduce size of countryBoundingBoxes and countryPolygons

* update files again, and update countryExport script

* update files again, add more simplified geojson files, and update countryExport with Copilot
2026-08-04 13:51:13 +03:00

25 lines
776 B
TypeScript

import { fullRights, noRights } from '@/components/pages'
import { ProjectDetails } from '@/components/Project/ProjectDetails'
import { ProjectTable } from '@/components/Project/ProjectTable'
import { UserState } from '@/redux/userReducer'
import { ProjectDetailsType, Role } from '@/shared/types'
import { Page } from '../components/Page'
export const ProjectPage = () => {
return (
<Page
allowedRoles={[Role.Admin]}
tableView={<ProjectTable />}
detailView={<ProjectDetails />}
viewName="project"
idFieldName="pid"
createTitle={(project: ProjectDetailsType) => `${project.proj_name}`}
getEditRights={(user: UserState) => {
if (user.role === Role.Admin) return fullRights
return noRights
}}
/>
)
}