Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit ada90ae

Browse files
committed
fix: replace button with link
1 parent 7961eb6 commit ada90ae

1 file changed

Lines changed: 7 additions & 12 deletions

File tree

apps/ui/components/common/StartApplicationBar.tsx

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { Button, IconArrowRight, IconCross } from "hds-react";
22
import React from "react";
33
import { useTranslation } from "next-i18next";
4-
import { useRouter } from "next/router";
54
import styled from "styled-components";
65
import { breakpoints } from "common/src/common/style";
76
import { Container as CommonContainer } from "common";
87
import ClientOnly from "common/src/ClientOnly";
98
import { JustForDesktop, JustForMobile } from "@/modules/style/layout";
109
import { truncatedText } from "@/styles/util";
10+
import Link from "next/link";
1111

1212
type Props = {
1313
count: number;
@@ -77,18 +77,19 @@ const DeleteButton = styled(Button).attrs({
7777
${truncatedText}
7878
`;
7979

80-
const SubmitButton = styled(Button)`
80+
const StyledLink = styled(Link)`
8181
background-color: var(--color-white);
8282
color: var(--color-bus);
8383
${truncatedText}
84+
display: flex;
85+
gap: var(--spacing-2-xs);
8486
`;
8587

8688
const StartApplicationBar = ({
8789
count,
8890
clearSelections,
8991
}: Props): JSX.Element | null => {
9092
const { t } = useTranslation();
91-
const router = useRouter();
9293

9394
// This breaks SSR because the server knowns nothing about client side stores
9495
// we can't fix it with CSS since it doesn't update properly
@@ -124,17 +125,11 @@ const StartApplicationBar = ({
124125
</JustForMobile>
125126
</DeleteButton>
126127
</Left>
127-
<SubmitButton
128-
id="startApplicationButton"
129-
variant="primary"
130-
iconRight={<IconArrowRight />}
131-
onClick={() => {
132-
router.push(`/intro`);
133-
}}
134-
>
128+
<StyledLink id="startApplicationButton" href="/intro">
135129
<JustForDesktop>{t("shoppingCart:next")}</JustForDesktop>
136130
<JustForMobile>{t("shoppingCart:nextShort")}</JustForMobile>
137-
</SubmitButton>
131+
<IconArrowRight />
132+
</StyledLink>
138133
</InnerContainer>
139134
</Container>
140135
</BackgroundContainer>

0 commit comments

Comments
 (0)