-
Notifications
You must be signed in to change notification settings - Fork 353
Expand file tree
/
Copy pathassets.component.tsx
More file actions
73 lines (69 loc) · 2.59 KB
/
assets.component.tsx
File metadata and controls
73 lines (69 loc) · 2.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
"use client";
import React, { useCallback } from "react";
import styles from "./assets.module.scss";
import { clsx } from "clsx";
import Image, { StaticImageData } from "next/image";
import { DownloadIconComponent } from "@/features/common/assets/download-icon.component";
import Link from "next/link";
import { BoxComponent } from "@/features/common/components/box/box.component";
import { JwtDictionaryModel } from "@/features/localization/models/jwt-dictionary.model";
import { getLocalizedSecondaryFont } from "@/libs/theme/fonts";
import viewOnImg from "./view-on.png";
import compatibleImg from "./jwt-compatible.png";
import iconImg from "./jwt.icon.png";
import iconWithLabelImg from "./jwt-label.icon.png";
import { createUrlPath } from "@/libs/utils/path.utils";
import { DEFAULT_LANGUAGE_CODE } from "@/features/localization/localization.config";
import { Button } from "react-aria-components";
import { ArrowHeadIconComponent } from "@/features/common/assets/arrow-head-icon.component";
import { Auth0DictionaryModel } from "@/features/localization/models/auth0-dictionary.model";
import { Auth0CtaComponent } from "@/features/common/components/auth0-cta/auth0-cta.component";
import { SkillsCtaComponent } from "./skills-cta.component";
type AssetsComponentProps = {
languageCode: string;
jwtDictionary: JwtDictionaryModel;
auth0Dictionary: Auth0DictionaryModel;
};
export const AssetsComponent: React.FC<AssetsComponentProps> = ({
languageCode,
jwtDictionary,
auth0Dictionary,
}) => {
const libraryLinkPath = createUrlPath([
languageCode === DEFAULT_LANGUAGE_CODE ? "" : languageCode,
jwtDictionary.libraries.ctaButton.path
? jwtDictionary.libraries.ctaButton.path
: "",
]);
return (
<div className={styles.content}>
<div className={clsx(styles.assets__column)}>
<h4
className={clsx(
styles.assets__title,
getLocalizedSecondaryFont(languageCode)
)}
>
{jwtDictionary.libraries.title}
</h4>
<div className={styles.assets__content}>
<p className={styles.assets__description}>
{jwtDictionary.libraries.description}
</p>
<Link className={styles.asset__link} href={libraryLinkPath}>
{jwtDictionary.libraries.ctaButton.label}
<ArrowHeadIconComponent />
</Link>
</div>
</div>
<Auth0CtaComponent
languageCode={languageCode}
dictionary={auth0Dictionary.banner}
/>
<SkillsCtaComponent
languageCode={languageCode}
dictionary={jwtDictionary.skills}
/>
</div>
);
};