Skip to content

Commit

Permalink
addressed comments #497
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoGuarnaccia5 committed Apr 23, 2024
1 parent bec5c2f commit baff7b8
Show file tree
Hide file tree
Showing 7 changed files with 468 additions and 41 deletions.
2 changes: 1 addition & 1 deletion src/api/systems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const fetchSystems = async (parent_id?: string): Promise<System[]> => {
export const useSystemIds = (ids: string[]): UseQueryResult<System>[] => {
return useQueries({
queries: ids.map((id) => ({
queryKey: ['Systems', id],
queryKey: ['System', id],
queryFn: () => fetchSystem(id),
})),
});
Expand Down
132 changes: 132 additions & 0 deletions src/items/__snapshots__/itemsDetailsPanel.component.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,24 @@ exports[`Catalogue Items details panel > renders details panel correctly (None v
scrapped
</p>
</div>
<div
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-6 css-1b3l6lk-MuiGrid-root"
>
<p
class="MuiTypography-root MuiTypography-body1 css-1gqyz35-MuiTypography-root"
>
System
</p>
<p
class="MuiTypography-root MuiTypography-body1 css-1pnmrwp-MuiTypography-root"
>
<a
class="MuiTypography-root MuiTypography-inherit MuiLink-root MuiLink-underlineHover css-11iau0r-MuiTypography-root-MuiLink-root"
href="/systems/undefined"
target="_blank"
/>
</p>
</div>
<div
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-6 css-1b3l6lk-MuiGrid-root"
>
Expand Down Expand Up @@ -739,6 +757,24 @@ exports[`Catalogue Items details panel > renders details panel correctly (no dat
inUse
</p>
</div>
<div
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-6 css-1b3l6lk-MuiGrid-root"
>
<p
class="MuiTypography-root MuiTypography-body1 css-1gqyz35-MuiTypography-root"
>
System
</p>
<p
class="MuiTypography-root MuiTypography-body1 css-1pnmrwp-MuiTypography-root"
>
<a
class="MuiTypography-root MuiTypography-inherit MuiLink-root MuiLink-underlineHover css-11iau0r-MuiTypography-root-MuiLink-root"
href="/systems/undefined"
target="_blank"
/>
</p>
</div>
<div
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-6 css-1b3l6lk-MuiGrid-root"
>
Expand Down Expand Up @@ -1259,6 +1295,24 @@ exports[`Catalogue Items details panel > renders details panel correctly (when t
new
</p>
</div>
<div
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-6 css-1b3l6lk-MuiGrid-root"
>
<p
class="MuiTypography-root MuiTypography-body1 css-1gqyz35-MuiTypography-root"
>
System
</p>
<p
class="MuiTypography-root MuiTypography-body1 css-1pnmrwp-MuiTypography-root"
>
<a
class="MuiTypography-root MuiTypography-inherit MuiLink-root MuiLink-underlineHover css-11iau0r-MuiTypography-root-MuiLink-root"
href="/systems/undefined"
target="_blank"
/>
</p>
</div>
<div
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-6 css-1b3l6lk-MuiGrid-root"
>
Expand Down Expand Up @@ -1779,6 +1833,24 @@ exports[`Catalogue Items details panel > renders details panel correctly 1`] = `
inUse
</p>
</div>
<div
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-6 css-1b3l6lk-MuiGrid-root"
>
<p
class="MuiTypography-root MuiTypography-body1 css-1gqyz35-MuiTypography-root"
>
System
</p>
<p
class="MuiTypography-root MuiTypography-body1 css-1pnmrwp-MuiTypography-root"
>
<a
class="MuiTypography-root MuiTypography-inherit MuiLink-root MuiLink-underlineHover css-11iau0r-MuiTypography-root-MuiLink-root"
href="/systems/undefined"
target="_blank"
/>
</p>
</div>
<div
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-6 css-1b3l6lk-MuiGrid-root"
>
Expand Down Expand Up @@ -2309,6 +2381,26 @@ exports[`Catalogue Items details panel > renders manufacturer panel correctly 1`
inUse
</p>
</div>
<div
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-6 css-1b3l6lk-MuiGrid-root"
>
<p
class="MuiTypography-root MuiTypography-body1 css-1gqyz35-MuiTypography-root"
>
System
</p>
<p
class="MuiTypography-root MuiTypography-body1 css-1pnmrwp-MuiTypography-root"
>
<a
class="MuiTypography-root MuiTypography-inherit MuiLink-root MuiLink-underlineHover css-11iau0r-MuiTypography-root-MuiLink-root"
href="/systems/65328f34a40ff5301575a4e3"
target="_blank"
>
Giant laser
</a>
</p>
</div>
<div
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-6 css-1b3l6lk-MuiGrid-root"
>
Expand Down Expand Up @@ -2856,6 +2948,26 @@ exports[`Catalogue Items details panel > renders notes panel correctly 1`] = `
inUse
</p>
</div>
<div
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-6 css-1b3l6lk-MuiGrid-root"
>
<p
class="MuiTypography-root MuiTypography-body1 css-1gqyz35-MuiTypography-root"
>
System
</p>
<p
class="MuiTypography-root MuiTypography-body1 css-1pnmrwp-MuiTypography-root"
>
<a
class="MuiTypography-root MuiTypography-inherit MuiLink-root MuiLink-underlineHover css-11iau0r-MuiTypography-root-MuiLink-root"
href="/systems/65328f34a40ff5301575a4e3"
target="_blank"
>
Giant laser
</a>
</p>
</div>
<div
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-6 css-1b3l6lk-MuiGrid-root"
>
Expand Down Expand Up @@ -3403,6 +3515,26 @@ exports[`Catalogue Items details panel > renders properties panel correctly 1`]
inUse
</p>
</div>
<div
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-6 css-1b3l6lk-MuiGrid-root"
>
<p
class="MuiTypography-root MuiTypography-body1 css-1gqyz35-MuiTypography-root"
>
System
</p>
<p
class="MuiTypography-root MuiTypography-body1 css-1pnmrwp-MuiTypography-root"
>
<a
class="MuiTypography-root MuiTypography-inherit MuiLink-root MuiLink-underlineHover css-11iau0r-MuiTypography-root-MuiLink-root"
href="/systems/65328f34a40ff5301575a4e3"
target="_blank"
>
Giant laser
</a>
</p>
</div>
<div
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-6 css-1b3l6lk-MuiGrid-root"
>
Expand Down
Loading

0 comments on commit baff7b8

Please sign in to comment.