Skip to content

Commit

Permalink
replace slash in url
Browse files Browse the repository at this point in the history
  • Loading branch information
steveoni committed Dec 15, 2023
1 parent 81293b9 commit 5026d93
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions components/dataset/DataExplorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,12 @@ const DataExplorer: React.FC<{
<div className="grid xl:justify-items-end align-middle justify-items-start ">
<Link
href={`${router.asPath}/r/${encodeURIComponent(
resources[activeTable].name
resources[activeTable].name.replace(/\//g, '_')
)}`}
>
<a
href={`${router.asPath}/r/${encodeURIComponent(
resources[activeTable].name
resources[activeTable].name.replace(/\//g, '_')
)}`}
className="rounded-xl bg-button-gradient p-3 text-white font-avenir font-medium text-[20px] h-fit"
>
Expand Down
2 changes: 1 addition & 1 deletion components/resource/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const About: React.FC<{ variables: any }> = ({ variables }) => {
const { result } = data.dataset;
// Find right resource
const resource = result.resources.find(
(item) => item.name === variables.resource
(item) => item.name.replace(/\//g, '_') === variables.resource
);

if (!resource?.id)
Expand Down
2 changes: 1 addition & 1 deletion pages/[org]/[dataset]/r/[resource]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Resource: React.FC<{ variables: any }> = ({ variables }) => {
const { result } = data.dataset;
// Find right resource
const resource = result.resources.find(
(item) => item.name === variables.resource
(item) => item.name.replace(/\//g, '_') === variables.resource
);

if (!resource) return <FourOhFour></FourOhFour>;
Expand Down

0 comments on commit 5026d93

Please sign in to comment.