From de182bccb0bab13f90545e9d0496866e9dddf811 Mon Sep 17 00:00:00 2001 From: Erik Escoffier Date: Thu, 28 Sep 2023 17:40:43 +0200 Subject: [PATCH 1/7] Revert "Proper redirect" This reverts commit 5a22094e7e2bad2be55b673215db8acccdf921fa. --- app/scripts/redirects.tsx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/app/scripts/redirects.tsx b/app/scripts/redirects.tsx index e1d6d6e2a..f6649346a 100644 --- a/app/scripts/redirects.tsx +++ b/app/scripts/redirects.tsx @@ -1,8 +1,9 @@ import React from 'react'; import { Navigate, Route, useParams } from 'react-router'; -import { DATASETS_PATH, STORIES_PATH } from '$utils/routes'; +import { STORIES_PATH } from '$utils/routes'; import { useDataset } from '$utils/veda-data'; +import DatasetsOverview from '$components/datasets/s-overview'; import DatasetsExplore from '$components/datasets/s-explore'; function DiscoveryRedirect() { @@ -57,10 +58,5 @@ export const discoveryRoutes = ( export function DatasetExploreRedirect() { const dataset = useDataset(); - const url = `${DATASETS_PATH}/${dataset?.data.id}`; - return dataset?.data.disableExplore ? ( - - ) : ( - - ); + return dataset?.data.disableExplore ? : ; } From 4af51139e70456a1ad582b1801bb5b073a787d62 Mon Sep 17 00:00:00 2001 From: Erik Escoffier Date: Thu, 28 Sep 2023 17:40:49 +0200 Subject: [PATCH 2/7] Revert "Redirect to overview when explore is not allowed" This reverts commit 94202b2030ba9dc5709a8da252a0b585b11131fb. --- app/scripts/components/datasets/s-overview/index.tsx | 2 +- app/scripts/main.tsx | 5 +++-- app/scripts/redirects.tsx | 8 -------- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/app/scripts/components/datasets/s-overview/index.tsx b/app/scripts/components/datasets/s-overview/index.tsx index dc1bcd425..eaaa26239 100644 --- a/app/scripts/components/datasets/s-overview/index.tsx +++ b/app/scripts/components/datasets/s-overview/index.tsx @@ -59,7 +59,7 @@ function DatasetsOverview() { {dataset?.data.disableExplore !== true && (