Skip to content

Commit

Permalink
PORTALS-3195 - Migrate cancer complexity portal to react-router v6
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgros committed Nov 18, 2024
1 parent 85a15db commit 3122e6d
Show file tree
Hide file tree
Showing 26 changed files with 1,280 additions and 1,023 deletions.
2 changes: 1 addition & 1 deletion apps/portals/cancercomplexity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"start": "vite",
"build": "pnpm save-build-date && vite build && pnpm run generate-sitemap cancercomplexity",
"preview": "vite preview",
"type-check": "tsc",
"type-check": "tsc --build",
"lint": "eslint src",
"_generate-sitemap": "node ../../synapse-portal-framework/sitemap/generate-sitemap.cjs \\\"$VITE_PORTAL_KEY\\\"",
"generate-sitemap": "dotenv -- pnpm _generate-sitemap",
Expand Down
39 changes: 39 additions & 0 deletions apps/portals/cancercomplexity/src/config/explorePageRoutes.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import React from 'react'
import { RouteObject } from 'react-router-dom'
import { QueryWrapperPlotNav } from 'synapse-react-client'
import {
datasetsQueryWrapperPlotNavProps,
educationQueryWrapperPlotNavProps,
grantQueryWrapperPlotNavProps,
peopleQueryWrapperPlotNavProps,
publicationsQueryWrapperPlotNavProps,
toolsQueryWrapperPlotNavProps,
} from './synapseConfigs'

const explorePageRoutes = [
{
path: 'Grants',
element: <QueryWrapperPlotNav {...grantQueryWrapperPlotNavProps} />,
},
{
path: 'People',
element: <QueryWrapperPlotNav {...peopleQueryWrapperPlotNavProps} />,
},
{
path: 'Publications',
element: <QueryWrapperPlotNav {...publicationsQueryWrapperPlotNavProps} />,
},
{
path: 'Datasets',
element: <QueryWrapperPlotNav {...datasetsQueryWrapperPlotNavProps} />,
},
{
path: 'Tools',
element: <QueryWrapperPlotNav {...toolsQueryWrapperPlotNavProps} />,
},
{
path: 'Educational Resources',
element: <QueryWrapperPlotNav {...educationQueryWrapperPlotNavProps} />,
},
] satisfies RouteObject[]
export default explorePageRoutes
60 changes: 60 additions & 0 deletions apps/portals/cancercomplexity/src/config/navbarConfig.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import { NavbarConfig } from '@sage-bionetworks/synapse-portal-framework/components/navbar/Navbar'

export const navbarConfig: NavbarConfig = {
routes: [
{
name: 'Home',
path: '/',
children: [
{ name: 'Portal Goals', path: '/#Portal Goals' },
{
name: 'What Research Themes are Scientists Currently Focusing On?',
path: '/#What Research Themes are Scientists Currently Focusing On?',
},
{ name: "What's New", path: "/#What's New" },
{ name: 'Consortia', path: '/#Consortia' },
{
name: 'The Cancer Resource Information Ecosystem',
path: '/#The Cancer Resource Information Ecosystem',
},
{
name: 'About the Cancer Complexity Knowledge Portal',
path: '/#About the Cancer Complexity Knowledge Portal',
},
],
},
{
name: 'Explore',
path: '/Explore',
children: [
{ name: 'Grants', path: '/Explore/Grants' },
{ name: 'People', path: '/Explore/People' },
{ name: 'Publications', path: '/Explore/Publications' },
{
name: 'Datasets',
path: '/Explore/Datasets',
},
{
name: 'Tools',
path: '/Explore/Tools',
},
{
name: 'Educational Resources',
path: '/Explore/Educational Resources',
},
],
},
{
name: 'Intranet',
path: 'https://sites.google.com/sagebase.org/mc2intranet/home?authuser=0',
},
{
name: 'News',
path: 'https://news.cancercomplexity.synapse.org/',
},
{
name: 'Help',
path: 'https://help.cancercomplexity.synapse.org/',
},
],
}

This file was deleted.

Loading

0 comments on commit 3122e6d

Please sign in to comment.