diff --git a/package-lock.json b/package-lock.json
index 3c95d9e..6ef716e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -16,7 +16,6 @@
"react": "17.0.2",
"react-dom": "17.0.2",
"react-swipeable": "^6.2.0",
- "react-tooltip": "^4.2.21",
"turndown": "^7.1.1"
},
"devDependencies": {
@@ -2960,6 +2959,7 @@
"version": "15.8.1",
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",
"integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==",
+ "dev": true,
"dependencies": {
"loose-envify": "^1.4.0",
"object-assign": "^4.1.1",
@@ -3035,7 +3035,8 @@
"node_modules/react-is": {
"version": "16.13.1",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
- "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
+ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
+ "dev": true
},
"node_modules/react-swipeable": {
"version": "6.2.0",
@@ -3045,22 +3046,6 @@
"react": "^16.8.3 || ^17"
}
},
- "node_modules/react-tooltip": {
- "version": "4.2.21",
- "resolved": "https://registry.npmjs.org/react-tooltip/-/react-tooltip-4.2.21.tgz",
- "integrity": "sha512-zSLprMymBDowknr0KVDiJ05IjZn9mQhhg4PRsqln0OZtURAJ1snt1xi5daZfagsh6vfsziZrc9pErPTDY1ACig==",
- "dependencies": {
- "prop-types": "^15.7.2",
- "uuid": "^7.0.3"
- },
- "engines": {
- "npm": ">=6.13"
- },
- "peerDependencies": {
- "react": ">=16.0.0",
- "react-dom": ">=16.0.0"
- }
- },
"node_modules/readdirp": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
@@ -3555,14 +3540,6 @@
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
"dev": true
},
- "node_modules/uuid": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz",
- "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==",
- "bin": {
- "uuid": "dist/bin/uuid"
- }
- },
"node_modules/v8-compile-cache": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",
@@ -5740,6 +5717,7 @@
"version": "15.8.1",
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",
"integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==",
+ "dev": true,
"requires": {
"loose-envify": "^1.4.0",
"object-assign": "^4.1.1",
@@ -5786,7 +5764,8 @@
"react-is": {
"version": "16.13.1",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
- "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
+ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
+ "dev": true
},
"react-swipeable": {
"version": "6.2.0",
@@ -5794,15 +5773,6 @@
"integrity": "sha512-nWQ8dEM8e/uswZLSIkXUsAnQmnX4MTcryOHBQIQYRMJFDpgDBSiVbKsz/BZVCIScF4NtJh16oyxwaNOepR6xSw==",
"requires": {}
},
- "react-tooltip": {
- "version": "4.2.21",
- "resolved": "https://registry.npmjs.org/react-tooltip/-/react-tooltip-4.2.21.tgz",
- "integrity": "sha512-zSLprMymBDowknr0KVDiJ05IjZn9mQhhg4PRsqln0OZtURAJ1snt1xi5daZfagsh6vfsziZrc9pErPTDY1ACig==",
- "requires": {
- "prop-types": "^15.7.2",
- "uuid": "^7.0.3"
- }
- },
"readdirp": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
@@ -6143,11 +6113,6 @@
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
"dev": true
},
- "uuid": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz",
- "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg=="
- },
"v8-compile-cache": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",
diff --git a/package.json b/package.json
index 661ba85..f46c44f 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,6 @@
"react": "17.0.2",
"react-dom": "17.0.2",
"react-swipeable": "^6.2.0",
- "react-tooltip": "^4.2.21",
"turndown": "^7.1.1"
},
"devDependencies": {
diff --git a/src/components/AppLayout.tsx b/src/components/AppLayout.tsx
index 51eab74..5806fe2 100644
--- a/src/components/AppLayout.tsx
+++ b/src/components/AppLayout.tsx
@@ -7,9 +7,8 @@ import Head from "next/head";
import { useSwipeable } from "react-swipeable";
import { useRouter } from "next/router";
import Button from "components/Button";
-import { getOgImage, OgImage, prettyLanguage } from "queries/helpers";
+import { getOgImage, OgImage } from "queries/helpers";
import { useMediaCoarse, useMediaMobile } from "hooks/useMediaQuery";
-import ReactTooltip from "react-tooltip";
import { useAppLayout } from "contexts/AppLayoutContext";
import { ImageQuality } from "./Img";
import Popup from "./Popup";
@@ -25,7 +24,6 @@ interface AppLayoutProps extends AppStaticProps {
navTitle: string;
thumbnail?: StrapiImage;
description?: string;
- extra?: React.ReactNode;
}
export default function AppLayout(props: AppLayoutProps): JSX.Element {
@@ -413,20 +411,7 @@ export default function AppLayout(props: AppLayoutProps): JSX.Element {
-
-
-
- {props.extra}
);
}
diff --git a/src/components/Chip.tsx b/src/components/Chip.tsx
index f0d117f..b7bc9e1 100644
--- a/src/components/Chip.tsx
+++ b/src/components/Chip.tsx
@@ -1,25 +1,12 @@
type ChipProps = {
className?: string;
children: React.ReactNode;
- "data-tip"?: string;
- "data-for"?: string;
- "data-html"?: boolean;
- "data-multiline"?: boolean;
};
export default function Chip(props: ChipProps): JSX.Element {
return (
{props.children}
diff --git a/src/components/Chronology/ChronologyItemComponent.tsx b/src/components/Chronology/ChronologyItemComponent.tsx
index 3864c27..4bbc44c 100644
--- a/src/components/Chronology/ChronologyItemComponent.tsx
+++ b/src/components/Chronology/ChronologyItemComponent.tsx
@@ -85,23 +85,7 @@ export default function ChronologyItemComponent(
{translation.status !==
Enum_Componenttranslationschronologyitem_Status.Done && (
-
- {translation.status}
-
+ {translation.status}
)}
{translation.title ?
{translation.title}
: ""}
diff --git a/src/components/PanelComponents/NavOption.tsx b/src/components/PanelComponents/NavOption.tsx
index be793d4..5a72763 100644
--- a/src/components/PanelComponents/NavOption.tsx
+++ b/src/components/PanelComponents/NavOption.tsx
@@ -1,14 +1,12 @@
import { useRouter } from "next/router";
import Link from "next/link";
import { MouseEventHandler } from "react";
-import ReactDOMServer from "react-dom/server";
type NavOptionProps = {
url: string;
icon?: string;
title: string;
subtitle?: string;
- tooltipId?: string;
border?: boolean;
reduced?: boolean;
onClick?: MouseEventHandler;
@@ -28,17 +26,6 @@ export default function NavOption(props: NavOptionProps): JSX.Element {
-
{props.title}
- {props.subtitle && (
-
{props.subtitle}
- )}
-
- )}
- data-for={props.tooltipId}
className={`grid grid-flow-col grid-cols-[auto] auto-cols-fr justify-center ${
props.icon ? "text-left" : "text-center"
} ${divCommon}`}
diff --git a/src/components/Panels/MainPanel.tsx b/src/components/Panels/MainPanel.tsx
index 5ea88c6..f585633 100644
--- a/src/components/Panels/MainPanel.tsx
+++ b/src/components/Panels/MainPanel.tsx
@@ -102,7 +102,6 @@ export default function MainPanel(props: MainPanelProps): JSX.Element {
icon="library_books"
title={langui.library}
subtitle={langui.library_short_description}
- tooltipId="MainPanelTooltip"
reduced={appLayout.mainPanelReduced && isDesktop}
onClick={() => appLayout.setMainPanelOpen(false)}
/>
@@ -112,7 +111,6 @@ export default function MainPanel(props: MainPanelProps): JSX.Element {
icon="workspaces"
title={langui.contents}
subtitle={langui.contents_short_description}
- tooltipId="MainPanelTooltip"
reduced={appLayout.mainPanelReduced && isDesktop}
onClick={() => appLayout.setMainPanelOpen(false)}
/>
@@ -124,7 +122,7 @@ export default function MainPanel(props: MainPanelProps): JSX.Element {
icon="travel_explore"
title={langui.wiki}
subtitle={langui.wiki_short_description}
- tooltipId="MainPanelTooltip"
+
reduced={appLayout.mainPanelReduced && isDesktop}
onClick={() => appLayout.setMainPanelOpen(false)}
/>
@@ -134,7 +132,7 @@ export default function MainPanel(props: MainPanelProps): JSX.Element {
icon="watch_later"
title={langui.chronicles}
subtitle={langui.chronicles_short_description}
- tooltipId="MainPanelTooltip"
+
reduced={appLayout.mainPanelReduced && isDesktop}
onClick={() => appLayout.setMainPanelOpen(false)}
/>
@@ -147,7 +145,6 @@ export default function MainPanel(props: MainPanelProps): JSX.Element {
url="/news"
icon="feed"
title={langui.news}
- tooltipId="MainPanelTooltip"
reduced={appLayout.mainPanelReduced && isDesktop}
onClick={() => appLayout.setMainPanelOpen(false)}
/>
@@ -156,7 +153,7 @@ export default function MainPanel(props: MainPanelProps): JSX.Element {
url="/merch"
icon="store"
title={langui.merch}
- tooltipId="MainPanelTooltip"
+
reduced={appLayout.mainPanelReduced && isDesktop}
onClick={() => appLayout.setMainPanelOpen(false)}
/>
@@ -167,7 +164,6 @@ export default function MainPanel(props: MainPanelProps): JSX.Element {
url="/gallery"
icon="collections"
title={langui.gallery}
- tooltipId="MainPanelTooltip"
reduced={appLayout.mainPanelReduced && isDesktop}
onClick={() => appLayout.setMainPanelOpen(false)}
/>
@@ -178,7 +174,7 @@ export default function MainPanel(props: MainPanelProps): JSX.Element {
url="/archives"
icon="inventory"
title={langui.archives}
- tooltipId="MainPanelTooltip"
+
reduced={appLayout.mainPanelReduced && isDesktop}
onClick={() => appLayout.setMainPanelOpen(false)}
/>
@@ -190,7 +186,6 @@ export default function MainPanel(props: MainPanelProps): JSX.Element {
url="/about-us"
icon="info"
title={langui.about_us}
- tooltipId="MainPanelTooltip"
reduced={appLayout.mainPanelReduced && isDesktop}
onClick={() => appLayout.setMainPanelOpen(false)}
/>
diff --git a/src/components/RecorderChip.tsx b/src/components/RecorderChip.tsx
index 404ca8e..6f84bd7 100644
--- a/src/components/RecorderChip.tsx
+++ b/src/components/RecorderChip.tsx
@@ -3,8 +3,6 @@ import {
GetContentTextQuery,
GetWebsiteInterfaceQuery,
} from "graphql/operations-types";
-import Img, { ImageQuality } from "./Img";
-import ReactDOMServer from "react-dom/server";
type RecorderChipProps = {
className?: string;
@@ -16,47 +14,7 @@ export default function RecorderChip(props: RecorderChipProps): JSX.Element {
const recorder = props.recorder;
const langui = props.langui;
return (
-
-
- {recorder.attributes.avatar.data && (
-
![]()
- )}
-
{recorder.attributes.username}
-
- {recorder.attributes.languages.data.length > 0 && (
-
-
{langui.languages}:
- {recorder.attributes.languages.data.map((language) => (
-
- {language.attributes.code.toUpperCase()}
-
- ))}
-
- )}
- {recorder.attributes.pronouns && (
-
-
{langui.pronouns}:
-
{recorder.attributes.pronouns}
-
- )}
-
- {recorder.attributes.bio.length > 0 &&
- recorder.attributes.bio[0].bio}
-
-
- )}
- data-for={"RecordersTooltip"}
- data-multiline
- data-html
- >
+
{recorder.attributes.anonymize
? `Recorder#${recorder.attributes.anonymous_code}`
: recorder.attributes.username}
diff --git a/src/pages/contents/[slug]/read.tsx b/src/pages/contents/[slug]/read.tsx
index 68cf596..d30be0d 100644
--- a/src/pages/contents/[slug]/read.tsx
+++ b/src/pages/contents/[slug]/read.tsx
@@ -23,7 +23,6 @@ import {
import Button from "components/Button";
import { useRouter } from "next/router";
import Chip from "components/Chip";
-import ReactTooltip from "react-tooltip";
import RecorderChip from "components/RecorderChip";
import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps";
import TOC from "components/Markdown/TOC";
@@ -35,7 +34,7 @@ interface ContentReadProps extends AppStaticProps {
export default function ContentRead(props: ContentReadProps): JSX.Element {
useTesting(props);
- const { langui, content } = props;
+ const { langui, content, languages } = props;
const router = useRouter();
const subPanel = (
@@ -68,7 +67,8 @@ export default function ContentRead(props: ContentReadProps): JSX.Element {
}
>
{prettyLanguage(
- content.text_set[0].source_language.data.attributes.code
+ content.text_set[0].source_language.data.attributes.code,
+ languages
)}
@@ -77,23 +77,7 @@ export default function ContentRead(props: ContentReadProps): JSX.Element {
{langui.status}:
-
- {content.text_set[0].status}
-
+
{content.text_set[0].status}
{content.text_set[0].transcribers.data.length > 0 && (
@@ -184,32 +168,6 @@ export default function ContentRead(props: ContentReadProps): JSX.Element {
);
- const extra = (
- <>
-
-
-
- >
- );
-
return (
0
? content.type.data.attributes.titles[0].title
diff --git a/src/pages/wiki/chronology.tsx b/src/pages/wiki/chronology.tsx
index b006c03..600ffcf 100644
--- a/src/pages/wiki/chronology.tsx
+++ b/src/pages/wiki/chronology.tsx
@@ -16,7 +16,6 @@ import {
} from "queries/helpers";
import InsetBox from "components/InsetBox";
import { useRouter } from "next/router";
-import ReactTooltip from "react-tooltip";
import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps";
interface ChronologyProps extends AppStaticProps {
@@ -107,16 +106,6 @@ export default function Chronology(props: ChronologyProps): JSX.Element {
))}
>
))}
-
-
);
diff --git a/src/queries/helpers.ts b/src/queries/helpers.ts
index bbf5786..a3e2800 100644
--- a/src/queries/helpers.ts
+++ b/src/queries/helpers.ts
@@ -5,6 +5,7 @@ import {
} from "components/Img";
import {
GetCurrenciesQuery,
+ GetLanguagesQuery,
GetLibraryItemQuery,
GetLibraryItemsPreviewQuery,
GetWebsiteInterfaceQuery,
@@ -138,23 +139,16 @@ export function prettyItemSubType(metadata: {
}
}
-export function prettyLanguage(code: string): string {
- switch (code) {
- case "en":
- return "English";
- case "es":
- return "Español";
- case "fr":
- return "Français";
- case "ja":
- return "日本語";
- case "en":
- return "English";
- case "xx":
- return "██";
- default:
- return code;
- }
+export function prettyLanguage(
+ code: string,
+ languages: GetLanguagesQuery["languages"]["data"]
+): string {
+ let result = code;
+ languages.forEach((language) => {
+ if (language.attributes.code === code)
+ result = language.attributes.localized_name;
+ });
+ return result;
}
export function prettyTestWarning(