feat(PageOverview): make PageOverview title text configurable
This commit is contained in:
committed by
Bastian
parent
1f01f6ccb6
commit
0e180cc841
@@ -84,6 +84,9 @@
|
|||||||
"description": "Contributions and source code of the AOE Tech Radar are on github:"
|
"description": "Contributions and source code of the AOE Tech Radar are on github:"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"pageOverview": {
|
||||||
|
"title": "Technologies Overview"
|
||||||
|
},
|
||||||
"legalInformationLink": "https://www.aoe.com/en/imprint.html",
|
"legalInformationLink": "https://www.aoe.com/en/imprint.html",
|
||||||
"search": "What are you looking for?"
|
"search": "What are you looking for?"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,6 +84,9 @@
|
|||||||
"description": "Contributions and source code of the AOE Tech Radar are on github:"
|
"description": "Contributions and source code of the AOE Tech Radar are on github:"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"pageOverview": {
|
||||||
|
"title": "Technologies Overview"
|
||||||
|
},
|
||||||
"legalInformationLink": "https://www.aoe.com/en/imprint.html",
|
"legalInformationLink": "https://www.aoe.com/en/imprint.html",
|
||||||
"search": "What are you looking for?"
|
"search": "What are you looking for?"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React, { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import HeadlineGroup from "../HeadlineGroup/HeadlineGroup";
|
import HeadlineGroup from "../HeadlineGroup/HeadlineGroup";
|
||||||
import HeroHeadline from "../HeroHeadline/HeroHeadline";
|
import HeroHeadline from "../HeroHeadline/HeroHeadline";
|
||||||
import Badge from "../Badge/Badge";
|
import Badge from "../Badge/Badge";
|
||||||
@@ -8,6 +8,7 @@ import Fadeable from "../Fadeable/Fadeable";
|
|||||||
import SetTitle from "../SetTitle";
|
import SetTitle from "../SetTitle";
|
||||||
import Flag from "../Flag/Flag";
|
import Flag from "../Flag/Flag";
|
||||||
import { groupByFirstLetter, Item } from "../../model";
|
import { groupByFirstLetter, Item } from "../../model";
|
||||||
|
import { useMessages } from "../../context/MessagesContext";
|
||||||
import { translate, Ring } from "../../config";
|
import { translate, Ring } from "../../config";
|
||||||
|
|
||||||
const containsSearchTerm = (text = "", term = "") => {
|
const containsSearchTerm = (text = "", term = "") => {
|
||||||
@@ -35,6 +36,8 @@ export default function PageOverview({
|
|||||||
}: PageOverviewProps) {
|
}: PageOverviewProps) {
|
||||||
const [ring, setRing] = useState<Ring | "all">("all");
|
const [ring, setRing] = useState<Ring | "all">("all");
|
||||||
const [search, setSearch] = useState(searchProp);
|
const [search, setSearch] = useState(searchProp);
|
||||||
|
const { pageOverview } = useMessages();
|
||||||
|
const title = pageOverview?.title || 'Technologies Overview';
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (rings.length > 0) {
|
if (rings.length > 0) {
|
||||||
@@ -81,9 +84,9 @@ export default function PageOverview({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Fadeable leaving={leaving} onLeave={onLeave}>
|
<Fadeable leaving={leaving} onLeave={onLeave}>
|
||||||
<SetTitle title="Technologies Overview" />
|
<SetTitle title={title} />
|
||||||
<HeadlineGroup>
|
<HeadlineGroup>
|
||||||
<HeroHeadline>Technologies Overview</HeroHeadline>
|
<HeroHeadline>{title}</HeroHeadline>
|
||||||
</HeadlineGroup>
|
</HeadlineGroup>
|
||||||
<div className="filter">
|
<div className="filter">
|
||||||
<div className="split split--filter">
|
<div className="split split--filter">
|
||||||
|
|||||||
@@ -27,11 +27,16 @@ interface PageHelp {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface PageOverview {
|
||||||
|
title: string;
|
||||||
|
}
|
||||||
|
|
||||||
export interface Messages {
|
export interface Messages {
|
||||||
footerFootnote?: string;
|
footerFootnote?: string;
|
||||||
socialLinks?: SocialLink[];
|
socialLinks?: SocialLink[];
|
||||||
legalInformationLink?: string;
|
legalInformationLink?: string;
|
||||||
pageHelp?: PageHelp;
|
pageHelp?: PageHelp;
|
||||||
|
pageOverview?: PageOverview;
|
||||||
searchPlaceholder?: string;
|
searchPlaceholder?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user