foundry-component-library 0.2.31 → 0.2.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,12 +5,15 @@ import styles from "./styles.module.scss";
5
5
  import type { Case, NextImage } from "../../types";
6
6
  import Item from "./Item";
7
7
  import LinkType from "next/link";
8
+ import { translate } from "../../utils";
8
9
 
9
10
  const Capabilities = ({
11
+ heading,
10
12
  items,
11
13
  Link,
12
14
  Image,
13
15
  }: {
16
+ heading: string;
14
17
  items: {
15
18
  heading: string;
16
19
  text: string;
@@ -26,9 +29,9 @@ const Capabilities = ({
26
29
  return (
27
30
  <Container>
28
31
  <a className={styles.button} href="#get-in-touch">
29
- Get in touch
32
+ {translate("Get in touch", "DE")}
30
33
  </a>
31
- <div className={styles.heading}>Our capabilities</div>
34
+ <div className={styles.heading}>{heading}</div>
32
35
  <div className={styles.items}>
33
36
  {items.map((item) => {
34
37
  return (
@@ -3,6 +3,7 @@ import React from "react";
3
3
  import { useActionState, useState } from "react";
4
4
  import { useRouter } from "next/navigation";
5
5
  import styles from "./styles.module.scss";
6
+ import { translate } from "../../utils";
6
7
 
7
8
  type LeadResult =
8
9
  | { success: true }
@@ -43,9 +44,12 @@ const GetInTouch = ({
43
44
  return (
44
45
  <section id="get-in-touch" className={styles.formSection}>
45
46
  <div className={styles.container}>
46
- <h2 className={styles.heading}>Get in touch</h2>
47
+ <h2 className={styles.heading}>{translate("Get in touch", "DE")}</h2>
47
48
  <p className={styles.subtitle}>
48
- Tell us about your brand and discover how we can help.
49
+ {translate(
50
+ "Tell us about your brand and discover how we can help.",
51
+ "DE",
52
+ )}
49
53
  </p>
50
54
  <form
51
55
  action={formAction}
@@ -35,8 +35,6 @@ const Hero = ({
35
35
 
36
36
  if (!image && !video) return;
37
37
 
38
- console.log("video", video);
39
-
40
38
  if (isFullWidth) {
41
39
  return (
42
40
  <div
@@ -42,7 +42,7 @@ const Hub = ({
42
42
  <div className={`${styles.hub} ${isActive ? styles.active : ""}`}>
43
43
  <div className={styles.top}>
44
44
  <div className={styles.title}>{hub.title}</div>
45
- <div className={styles.text}>{customFields.subheading}</div>
45
+ <div className={styles.text}>{customFields.approach}</div>
46
46
  <button className={styles.icon} onClick={() => setIsActive(!isActive)}>
47
47
  {isActive ? <Minus /> : <Plus />}
48
48
  </button>
@@ -42,8 +42,6 @@ const Dropdown = ({
42
42
  currentDisplay = selected.tag;
43
43
  }
44
44
 
45
- console.log("pp", displayLabels);
46
-
47
45
  return (
48
46
  <div
49
47
  className={`${styles.dropdown} ${isOpen ? styles.active : ""}`}
@@ -93,8 +93,6 @@ const Logos = ({
93
93
  }
94
94
  }, [selected]);
95
95
 
96
- console.log("qwe", selected);
97
-
98
96
  return (
99
97
  <Container>
100
98
  {!withoutFilters && (
@@ -11,10 +11,12 @@ function Other({
11
11
  cases,
12
12
  Link,
13
13
  Image,
14
+ lang,
14
15
  }: {
15
16
  cases: Case[];
16
17
  Link: NextLink;
17
18
  Image: NextImage;
19
+ lang?: "EN" | "DE";
18
20
  }) {
19
21
  const sectionRef = useRef(null);
20
22
  const { handleMouseDown, handleMouseMove, handleMouseUp, dragStyle } =
@@ -26,9 +28,11 @@ function Other({
26
28
  <Container noMobilePadding>
27
29
  <div className={styles.other}>
28
30
  <div className={styles.top}>
29
- <div className={styles.caption}>{translate("Case Studies")}</div>
31
+ <div className={styles.caption}>
32
+ {translate("Case Studies", lang)}
33
+ </div>
30
34
  <h3 className={styles.heading}>
31
- {translate("Success stories.\nWith proven results.")}
35
+ {translate("Success stories.\nWith proven results.", lang)}
32
36
  </h3>
33
37
  </div>
34
38
  <div
@@ -62,6 +62,7 @@ export default async function getHubBySlug({
62
62
  }
63
63
  }
64
64
  }
65
+ capabilitiesHeading
65
66
  capabilities {
66
67
  heading
67
68
  text
@@ -330,6 +330,7 @@ export type Hub = {
330
330
  }[];
331
331
  approach: string;
332
332
  relatedWork: Case[];
333
+ capabilitiesHeading: string;
333
334
  capabilities: {
334
335
  heading: string;
335
336
  text: string;
package/lib/utils.ts CHANGED
@@ -1,3 +1,29 @@
1
- export const translate = (text: string) => {
1
+ export const translate = (text: string, lang: string = "EN") => {
2
+ if (lang === "EN") return text;
3
+
4
+ if (text === "Get in touch") {
5
+ return "Kontakt aufnehmen";
6
+ }
7
+
8
+ if (text === "Tell us about your brand and discover how we can help.") {
9
+ return "Erzählen Sie uns von Ihrer Marke und entdecken Sie, wie wir Ihnen helfen können.";
10
+ }
11
+
12
+ if (text === "Success stories.\nWith proven results.") {
13
+ return "Erfolgsgeschichten.\nMit messbaren Ergebnissen.";
14
+ }
15
+
16
+ if (text === "") {
17
+ return "";
18
+ }
19
+
20
+ if (text === "") {
21
+ return "";
22
+ }
23
+
24
+ if (text === "") {
25
+ return "";
26
+ }
27
+
2
28
  return text;
3
29
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foundry-component-library",
3
- "version": "0.2.31",
3
+ "version": "0.2.32",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",