feat(PageItem): make PageItem back to quadrant overview text configurable
This commit is contained in:
committed by
Bastian
parent
0e180cc841
commit
a509e0a0da
@@ -87,6 +87,9 @@
|
||||
"pageOverview": {
|
||||
"title": "Technologies Overview"
|
||||
},
|
||||
"pageItem": {
|
||||
"quadrantOverview": "Quadrant Overview"
|
||||
},
|
||||
"legalInformationLink": "https://www.aoe.com/en/imprint.html",
|
||||
"search": "What are you looking for?"
|
||||
}
|
||||
|
||||
@@ -87,6 +87,9 @@
|
||||
"pageOverview": {
|
||||
"title": "Technologies Overview"
|
||||
},
|
||||
"pageItem": {
|
||||
"quadrantOverview": "Quadrant Overview"
|
||||
},
|
||||
"legalInformationLink": "https://www.aoe.com/en/imprint.html",
|
||||
"search": "What are you looking for?"
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import {
|
||||
groupByQuadrants,
|
||||
Item,
|
||||
} from "../../model";
|
||||
import { useMessages } from "../../context/MessagesContext";
|
||||
|
||||
const getItem = (pageName: string, items: Item[]) => {
|
||||
const [quadrantName, itemName] = pageName.split("/");
|
||||
@@ -33,6 +34,9 @@ type Props = {
|
||||
};
|
||||
|
||||
const PageItem: React.FC<Props> = ({ pageName, items, leaving, onLeave }) => {
|
||||
const { pageItem } = useMessages();
|
||||
const quadrantOverview = pageItem?.quadrantOverview || 'Quadrant Overview';
|
||||
|
||||
const itemsInRing = getItemsInRing(pageName, items);
|
||||
|
||||
const { getAnimationState, getAnimationStates } = useAnimations({
|
||||
@@ -70,7 +74,7 @@ const PageItem: React.FC<Props> = ({ pageName, items, leaving, onLeave }) => {
|
||||
<div className="split__right">
|
||||
<Link className="icon-link" pageName={item.quadrant}>
|
||||
<span className="icon icon--pie icon-link__icon" />
|
||||
Quadrant Overview
|
||||
{quadrantOverview}
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -31,12 +31,17 @@ interface PageOverview {
|
||||
title: string;
|
||||
}
|
||||
|
||||
interface PageItem {
|
||||
quadrantOverview: string;
|
||||
}
|
||||
|
||||
export interface Messages {
|
||||
footerFootnote?: string;
|
||||
socialLinks?: SocialLink[];
|
||||
legalInformationLink?: string;
|
||||
pageHelp?: PageHelp;
|
||||
pageOverview?: PageOverview;
|
||||
pageItem?: PageItem;
|
||||
searchPlaceholder?: string;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user