Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/components/organisms/HomePanel/HomePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ const HomePanel = ({
query: "(min-device-width: 1280px)",
});

const linkUrl = new URL(window.location.origin, `/skills/${context}/${name}`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const linkUrl = new URL(window.location.origin, `/skills/${context}/${name}`);
const linkUrl = new URL(`${config.nextPublicBaseUrl}/skills/${context}/${name}`);

const currentUrl = new URL(window.location.href);
if (currentUrl.searchParams.get("agency"))
linkUrl.searchParams.set("agency", currentUrl.searchParams.get("agency"));

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a besoin de garder ça quand meme. Dans l'idée ça réduit les clics pour un nouvel arrivant qui n'a aucune données

Suggested change
if (context === "mine" && !data.length)
linkUrl.searchParams.append("add", "true")

const roundTable = {
top: {
left: "rounded-tl-2xl",
Expand Down Expand Up @@ -222,10 +227,7 @@ const HomePanel = ({
</div>
</div>
<Link
href={{
pathname: `/skills/${context}/${name}`,
query: !data.length && context === "mine" && { add: true },
}}
href={linkUrl}
className={`flex step3-graph flex-auto flex-col w-4/5 cursor-pointer hover:border-light-graybutton hover:dark:bg-dark-radargrid dark:hover:border-dark-graybutton hover:bg-light-dark`}
>
{isDesktop && (
Expand Down