Merged in fix/sas-link-flow-links (pull request #1389)

Set correct links in SAS link flow

Approved-by: Joakim Jäderberg
This commit is contained in:
Anton Gunnarsson
2025-02-21 12:26:38 +00:00
parent 15dbeb9d46
commit 204bbbbcd4
3 changed files with 24 additions and 9 deletions

View File

@@ -2,15 +2,19 @@
import Link from "next/link" import Link from "next/link"
import { useIntl } from "react-intl" import { useIntl } from "react-intl"
import { scandicXSAS } from "@/constants/routes/myPages"
import ErrorCircleFilledIcon from "@/components/Icons/ErrorCircleFilled" import ErrorCircleFilledIcon from "@/components/Icons/ErrorCircleFilled"
import Button from "@/components/TempDesignSystem/Button" import Button from "@/components/TempDesignSystem/Button"
import Body from "@/components/TempDesignSystem/Text/Body" import Body from "@/components/TempDesignSystem/Text/Body"
import Title from "@/components/TempDesignSystem/Text/Title" import Title from "@/components/TempDesignSystem/Text/Title"
import useLang from "@/hooks/useLang"
import { SASModal, SASModalContactBlock, SASModalDivider } from "./SASModal" import { SASModal, SASModalContactBlock, SASModalDivider } from "./SASModal"
export function AlreadyLinkedError() { export function AlreadyLinkedError() {
const intl = useIntl() const intl = useIntl()
const lang = useLang()
return ( return (
<SASModal> <SASModal>
@@ -24,9 +28,10 @@ export function AlreadyLinkedError() {
id: "We could not connect your accounts to give you access. Please contact us and well help you resolve this issue.", id: "We could not connect your accounts to give you access. Please contact us and well help you resolve this issue.",
})} })}
</Body> </Body>
{/* TODO link to SASxScandic page on My Pages */}
<Button theme="base" asChild> <Button theme="base" asChild>
<Link href="#">{intl.formatMessage({ id: "View your account" })}</Link> <Link href={scandicXSAS[lang]}>
{intl.formatMessage({ id: "View your account" })}
</Link>
</Button> </Button>
<SASModalDivider /> <SASModalDivider />
<SASModalContactBlock /> <SASModalContactBlock />

View File

@@ -1,15 +1,20 @@
"use client" "use client"
import { Link } from "react-aria-components"
import { useIntl } from "react-intl" import { useIntl } from "react-intl"
import { profile } from "@/constants/routes/myPages"
import ErrorCircleFilledIcon from "@/components/Icons/ErrorCircleFilled" import ErrorCircleFilledIcon from "@/components/Icons/ErrorCircleFilled"
import Button from "@/components/TempDesignSystem/Button" import Button from "@/components/TempDesignSystem/Button"
import Body from "@/components/TempDesignSystem/Text/Body" import Body from "@/components/TempDesignSystem/Text/Body"
import Title from "@/components/TempDesignSystem/Text/Title" import Title from "@/components/TempDesignSystem/Text/Title"
import useLang from "@/hooks/useLang"
import { SASModal, SASModalContactBlock, SASModalDivider } from "./SASModal" import { SASModal, SASModalContactBlock, SASModalDivider } from "./SASModal"
export function DateOfBirthError() { export function DateOfBirthError() {
const intl = useIntl() const intl = useIntl()
const lang = useLang()
return ( return (
<SASModal> <SASModal>
@@ -23,9 +28,10 @@ export function DateOfBirthError() {
id: "We could not connect your accounts to give you access. Please contact us and well help you resolve this issue.", id: "We could not connect your accounts to give you access. Please contact us and well help you resolve this issue.",
})} })}
</Body> </Body>
{/* TODO link to where? */}
<Button theme="base"> <Button theme="base">
{intl.formatMessage({ id: "View your account" })} <Link href={profile[lang]}>
{intl.formatMessage({ id: "View your account" })}
</Link>
</Button> </Button>
<SASModalDivider /> <SASModalDivider />
<SASModalContactBlock /> <SASModalContactBlock />

View File

@@ -1,21 +1,25 @@
import React from "react" import React from "react"
import { scandicXSAS } from "@/constants/routes/myPages"
import CheckCircle from "@/components/Icons/CheckCircle" import CheckCircle from "@/components/Icons/CheckCircle"
import { Redirect } from "@/components/Redirect"
import Body from "@/components/TempDesignSystem/Text/Body" import Body from "@/components/TempDesignSystem/Text/Body"
import Title from "@/components/TempDesignSystem/Text/Title" import Title from "@/components/TempDesignSystem/Text/Title"
import { getIntl } from "@/i18n" import { getIntl } from "@/i18n"
import { SASModal } from "../../components/SASModal" import { SASModal } from "../../components/SASModal"
export default async function SASxScandicLinkPage() { import type { LangParams, PageArgs } from "@/types/params"
export default async function SASxScandicLinkPage({
params,
}: PageArgs<LangParams>) {
const intl = await getIntl() const intl = await getIntl()
return ( return (
<SASModal> <SASModal>
{/* <Redirect <Redirect url={scandicXSAS[params.lang]} timeout={3000} />
url={`INSERT CORRECT URL HERE`}
timeout={3000}
/> */}
<CheckCircle height={64} width={64} color="uiSemanticSuccess" /> <CheckCircle height={64} width={64} color="uiSemanticSuccess" />
<Title as="h2" level="h1" textAlign="center"> <Title as="h2" level="h1" textAlign="center">
{intl.formatMessage({ id: "Your accounts are connected" })} {intl.formatMessage({ id: "Your accounts are connected" })}