Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rejoin-consortia-hotfix-working #209

Merged
merged 1 commit into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions pages/data/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,21 @@ export default {
const route = useRoute()
if (route.query.type == 'projects') {
const focusQuery = route.query.selectedProjectsAnatomicalFocusIds
let newPath = '/about/projects?consortiaType=SPARC'
const consortiaType = route.query.selectedProjectsFundingIds
let newPath = '/about/projects?'
// Because we used to allow multiple projects to be selected at once before they became seperate tabs we now just re-direct to the SPARC
// project by default if more than 1 project was selected in the url. If only one was set then we can re-direct to that project
if (consortiaType) {
const consortiaTypes = consortiaType.split(",")
if (consortiaTypes.length == 1) {
newPath += `consortiaType=${consortiaTypes[0]}`
}
}
if (focusQuery) {
newPath += `&selectedProjectsAnatomicalFocusIds=${focusQuery}`
}
const router = useRouter()
await router.replace({ path: newPath })
router.push(newPath)
}
const { $algoliaClient } = useNuxtApp()
const algoliaSortOptions = [
Expand Down
4 changes: 2 additions & 2 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
<portal-features class="secondary-background" :features="portalFeatures" />
<hr />
<div>
<sparc-numbers :explore-data="exploreData"/>
<client-only><sparc-numbers :explore-data="exploreData"/></client-only>
</div>
<hr />
<div class="secondary-background">
<featured-data :featured-data="featuredData" />
<client-only><featured-data :featured-data="featuredData" /></client-only>
</div>
<hr />
<projects-and-datasets :datasetSectionTitle="datasetSectionTitle" :projectOrResource="featuredProject" :dataset="featuredDataset" />
Expand Down
Loading