Skip to content

Commit

Permalink
Merge branch 'main' into cat-help-instructions-update
Browse files Browse the repository at this point in the history
  • Loading branch information
cartja committed Dec 10, 2024
2 parents fbf7cdb + 9f9a9ad commit d39b8d4
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions src/components/Help.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,21 @@ export function Help(): JSX.Element {
const dispatch = useAppDispatch();
const is_configured = useAppSelector((state) => state.config.is_configured);
const signup_link = useAppSelector((state) => state.config.signup_link);
const locale = useAppSelector((state) => state.intl.locale);

const [approvedSecurityKeys, setApprovedSecurityKeys] = useState<ApprovedSecurityKeysTypes>();

const FrejaAppURL =
locale === "en" ? "https://frejaeid.com/en/get-freja-eid/" : "https://frejaeid.com/skaffa-freja-eid/";
const BankIdURL =
locale === "en" ? "https://www.bankid.com/en/privat/skaffa-bankid" : "https://www.bankid.com/privat/skaffa-bankid";
const FrejaeIdURL =
locale === "en"
? "https://org.frejaeid.com/en/an-e-id-for-foreign-citizens/"
: "https://org.frejaeid.com/en-e-legitimation-for-utlandska-medborgare/";
const UniversityAdmissionURL =
locale === "en" ? "https://www.universityadmissions.se/intl/start" : "https://www.antagning.se";

useEffect(() => {
document.title = intl.formatMessage({
id: "document title Help",
Expand Down Expand Up @@ -132,7 +144,7 @@ export function Help(): JSX.Element {
`}
values={{
link: (
<a className="text-link" href="https://www.universityadmissions.se" target="_blank">
<a className="text-link" href={UniversityAdmissionURL} target="_blank">
universityadmissions.se
</a>
),
Expand Down Expand Up @@ -552,7 +564,7 @@ export function Help(): JSX.Element {
Freja+ account according to the instructions,`}
values={{
Freja: (
<a className="text-link" href="https://frejaeid.com/en/get-freja-eid/" target="_blank">
<a className="text-link" href={FrejaAppURL} target="_blank">
Freja app
</a>
),
Expand Down Expand Up @@ -640,11 +652,7 @@ export function Help(): JSX.Element {
defaultMessage={`the BankID is obtained from your personal bank and installed on your device as an app or file. The process varies, so visit your bank's website and follow the instructions. You can read more about obtaining a BankID on {bankid},`}
values={{
bankid: (
<a
className="text-link"
href="https://www.bankid.com/en/privat/skaffa-bankid"
target="_blank"
>
<a className="text-link" href={BankIdURL} target="_blank">
BankID.com
</a>
),
Expand Down Expand Up @@ -737,11 +745,7 @@ export function Help(): JSX.Element {
defaultMessage={`Current information on included nationalities can be found at: {FrejaList}`}
values={{
FrejaList: (
<a
className="text-link"
href="https://org.frejaeid.com/en/an-e-id-for-foreign-citizens/"
target="_blank"
>
<a className="text-link" href={FrejaeIdURL} target="_blank">
Freja eID
</a>
),
Expand All @@ -763,7 +767,7 @@ export function Help(): JSX.Element {
profile supported by your passport, by installing the {FrejaApp} on your mobile device (iOS or Android) and following the instructions,`}
values={{
FrejaApp: (
<a className="text-link" href="https://frejaeid.com/en/get-freja-eid/" target="_blank">
<a className="text-link" href={FrejaAppURL} target="_blank">
Freja app
</a>
),
Expand Down

0 comments on commit d39b8d4

Please sign in to comment.