(false);
@@ -71,7 +71,7 @@ const Detail = (props: Props) => {
setIsLoadingProject(true);
props.setInvisibleFooter(true);
try {
- const projectDetail = await API.getProjectDetail(org!, project!, foundation!);
+ const projectDetail = await API.getProjectDetail(project!, foundation!);
setDetail(projectDetail);
updateMetaIndex(projectDetail.display_name || projectDetail.name, projectDetail.description);
setIsLoadingProject(false);
@@ -82,10 +82,10 @@ const Detail = (props: Props) => {
props.setInvisibleFooter(false);
}
}
- if (!isUndefined(org) && !isUndefined(project)) {
+ if (!isUndefined(project)) {
fetchProjectDetail();
}
- }, [org, project, foundation]); /* eslint-disable-line react-hooks/exhaustive-deps */
+ }, [project, foundation]); /* eslint-disable-line react-hooks/exhaustive-deps */
return (
<>
@@ -184,14 +184,11 @@ const Detail = (props: Props) => {
diff --git a/web/src/layout/navigation/Searchbar.test.tsx b/web/src/layout/navigation/Searchbar.test.tsx
index 7134bbc4..1ffb5f64 100644
--- a/web/src/layout/navigation/Searchbar.test.tsx
+++ b/web/src/layout/navigation/Searchbar.test.tsx
@@ -235,7 +235,7 @@ describe('Searchbar', () => {
await userEvent.click(items[1]);
expect(mockUseNavigate).toHaveBeenCalledTimes(1);
- expect(mockUseNavigate).toHaveBeenCalledWith('/projects/cncf/backstage/backstage');
+ expect(mockUseNavigate).toHaveBeenCalledWith('/projects/cncf/backstage');
});
it('loads new search from search dropdown', async () => {
@@ -330,7 +330,7 @@ describe('Searchbar', () => {
await userEvent.keyboard('{enter}');
expect(mockUseNavigate).toHaveBeenCalledTimes(1);
- expect(mockUseNavigate).toHaveBeenCalledWith('/projects/cncf/keptn/keptn');
+ expect(mockUseNavigate).toHaveBeenCalledWith('/projects/cncf/keptn');
});
});
diff --git a/web/src/layout/navigation/Searchbar.tsx b/web/src/layout/navigation/Searchbar.tsx
index 14e1c137..48a41237 100644
--- a/web/src/layout/navigation/Searchbar.tsx
+++ b/web/src/layout/navigation/Searchbar.tsx
@@ -78,7 +78,7 @@ const Searchbar = (props: Props) => {
forceBlur();
setValue('');
cleanProjectsSearch();
- navigate(`/projects/${selectedProject.foundation}/${selectedProject.organization.name}/${selectedProject.name}`);
+ navigate(`/projects/${selectedProject.foundation}/${selectedProject.name}`);
};
const forceBlur = (): void => {
diff --git a/web/src/layout/search/Card.test.tsx b/web/src/layout/search/Card.test.tsx
index 52f89abc..71fb9729 100644
--- a/web/src/layout/search/Card.test.tsx
+++ b/web/src/layout/search/Card.test.tsx
@@ -29,9 +29,6 @@ const defaultProps = {
maturity: Maturity.sandbox,
foundation: Foundation.cncf,
name: 'artifact-hub',
- organization: {
- name: 'artifact-hub',
- },
rating: 'a',
repositories: [
{
diff --git a/web/src/layout/search/Card.tsx b/web/src/layout/search/Card.tsx
index 63e71fb1..e89b2bf3 100644
--- a/web/src/layout/search/Card.tsx
+++ b/web/src/layout/search/Card.tsx
@@ -32,7 +32,7 @@ const Card = (props: Props) => {
role="button"
onClick={() => {
props.saveScrollPosition();
- navigate(`/projects/${props.project.foundation}/${props.project.organization.name}/${props.project.name}`, {
+ navigate(`/projects/${props.project.foundation}/${props.project.name}`, {
state: { currentSearch: props.currentQueryString },
});
}}
diff --git a/web/src/types.ts b/web/src/types.ts
index f99fc689..f7f29728 100644
--- a/web/src/types.ts
+++ b/web/src/types.ts
@@ -1,11 +1,3 @@
-export interface Organization {
- name: string;
- display_name?: string;
- description?: string;
- home_url: string;
- logo_url?: string;
-}
-
export interface BaseProject {
id: string;
name: string;
@@ -24,9 +16,6 @@ export interface BaseProject {
export interface Project extends BaseProject {
repositories: BaseRepository[];
- organization: {
- name: string;
- };
}
export interface ProjectDetail extends BaseProject {