Skip to content

Commit

Permalink
refactor: move search to v1
Browse files Browse the repository at this point in the history
  • Loading branch information
ciyer committed Jan 28, 2025
1 parent c28ab42 commit d75dc34
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion client/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function CentralContentContainer({ user, socket }) {
/>
</CompatRoute>
<CompatRoute path="/datasets">
<Redirect to="/search?type=dataset" />
<Redirect to="/v1/search?type=dataset" />
</CompatRoute>
<CompatRoute exact path="/v1/projects/new">
<ContainerWrap>
Expand Down
14 changes: 7 additions & 7 deletions client/src/components/quicknav/QuickNav.container.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ export const defaultSuggestionQuickBar = {
type: "fixed",
path: "",
id: "link-projects",
url: "/search",
url: "/v1/search",
label: "My Projects",
icon: "/project-icon.svg",
},
{
type: "fixed",
path: "",
id: "link-datasets",
url: "/search",
url: "/v1/search",
label: "My datasets",
icon: "/dataset-icon.svg",
},
Expand All @@ -57,15 +57,15 @@ export const defaultAnonymousSuggestionQuickBar = {
type: "fixed",
path: "",
id: "link-projects",
url: "/search",
url: "/v1/search",
label: "Projects",
icon: "/project-icon.svg",
},
{
type: "fixed",
path: "",
id: "link-datasets",
url: "/search",
url: "/v1/search",
label: "Datasets",
icon: "/dataset-icon.svg",
},
Expand Down Expand Up @@ -98,7 +98,7 @@ export function QuickNavContainer({ user }) {
type: "last-queries",
path: "",
id: "last-queries",
url: "/search",
url: "/v1/search",
label: query,
query,
});
Expand Down Expand Up @@ -132,8 +132,8 @@ export function QuickNavContainer({ user }) {
e.preventDefault();
setPhrase(currentPhrase);
refetchLastQueries(e.currentTarget);
if (location.pathname === "/search") return;
navigate("/search");
if (location.pathname === "/v1/search") return;
navigate("/v1/search");
};

const onSuggestionsFetchRequested = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ function ProjectAlert({ total }: ProjectAlertProps) {
<ExternalLink
role="text"
title="explore other projects"
url="/search"
url="/v1/search"
className="fw-bold"
/>{" "}
or{" "}
<ExternalLink
role="text"
title="search"
url="/search"
url="/v1/search"
className="fw-bold"
/>{" "}
for a specific project or dataset.
Expand Down
4 changes: 2 additions & 2 deletions client/src/utils/helpers/url/Url.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ const Url = {
// Please assign only strings or UrlRule objects.
pages: {
landing: "/",
search: "/search",
search: "/v1/search",
inactiveKgProjects: "/inactive-kg-projects",
help: {
base: "/help",
Expand Down Expand Up @@ -466,7 +466,7 @@ const Url = {
base: "/datasets",
},
searchEntities: {
base: "/search",
base: "/v1/search",
},
secrets: {
base: "/secrets",
Expand Down

0 comments on commit d75dc34

Please sign in to comment.