From 45b670de4e8e3ddc6af9cbbb8960e81777855567 Mon Sep 17 00:00:00 2001
From: DrMint
Date: Sat, 23 Jul 2022 23:11:52 +0200
Subject: [PATCH] Anchor link langui
---
src/components/AnchorShare.tsx | 14 +++++++++-----
src/components/Markdown/Markdawn.tsx | 16 +++++++++-------
src/components/PostPage.tsx | 2 +-
src/components/RecorderChip.tsx | 4 +++-
src/components/ThumbnailHeader.tsx | 2 +-
.../operations/getWebsiteInterface.graphql | 2 ++
src/pages/chronicles/[slug]/index.tsx | 7 +++++--
src/pages/contents/[slug]/index.tsx | 10 ++++++++--
src/pages/dev/editor.tsx | 2 +-
src/pages/wiki/chronology.tsx | 4 ++--
10 files changed, 41 insertions(+), 22 deletions(-)
diff --git a/src/components/AnchorShare.tsx b/src/components/AnchorShare.tsx
index a367f1d..0676cf4 100644
--- a/src/components/AnchorShare.tsx
+++ b/src/components/AnchorShare.tsx
@@ -1,6 +1,6 @@
-import { useRouter } from "next/router";
import { Ico, Icon } from "./Ico";
import { ToolTip } from "./ToolTip";
+import { AppStaticProps } from "graphql/getAppStaticProps";
/*
* ╭─────────────╮
@@ -9,18 +9,22 @@ import { ToolTip } from "./ToolTip";
interface Props {
id: string;
+ langui: AppStaticProps["langui"];
}
// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-export const AnchorShare = ({ id }: Props): JSX.Element => (
+export const AnchorShare = ({ id, langui }: Props): JSX.Element => (
- {/* TODO: Langui Copied! */}
-
+
{
const { playerName } = useAppLayout();
const router = useRouter();
@@ -85,7 +87,7 @@ export const Markdawn = ({
}) => (
{compProps.children}
-
+
),
},
@@ -98,7 +100,7 @@ export const Markdawn = ({
}) => (
{compProps.children}
-
+
),
},
@@ -111,7 +113,7 @@ export const Markdawn = ({
}) => (
{compProps.children}
-
+
),
},
@@ -124,7 +126,7 @@ export const Markdawn = ({
}) => (
{compProps.children}
-
+
),
},
@@ -137,7 +139,7 @@ export const Markdawn = ({
}) => (
{compProps.children}
-
+
),
},
@@ -150,7 +152,7 @@ export const Markdawn = ({
}) => (
{compProps.children}
-
+
),
},
@@ -199,7 +201,7 @@ export const Markdawn = ({
component: (compProps) => (
<>
-
+
{compProps.children}
>
diff --git a/src/components/PostPage.tsx b/src/components/PostPage.tsx
index 8687377..7da82b1 100644
--- a/src/components/PostPage.tsx
+++ b/src/components/PostPage.tsx
@@ -195,7 +195,7 @@ export const PostPage = ({
)}
{prependBody}
-
+
{appendBody}
),
diff --git a/src/components/RecorderChip.tsx b/src/components/RecorderChip.tsx
index 016cbd2..3ed1aae 100644
--- a/src/components/RecorderChip.tsx
+++ b/src/components/RecorderChip.tsx
@@ -55,7 +55,9 @@ export const RecorderChip = ({ recorder, langui }: Props): JSX.Element => (
)}
- {recorder.bio?.[0] && }
+ {recorder.bio?.[0] && (
+
+ )}
}
placement="top"
diff --git a/src/components/ThumbnailHeader.tsx b/src/components/ThumbnailHeader.tsx
index a544dbc..93dbd17 100644
--- a/src/components/ThumbnailHeader.tsx
+++ b/src/components/ThumbnailHeader.tsx
@@ -107,7 +107,7 @@ export const ThumbnailHeader = ({
{description && (
- {}
+ {}
)}
>
diff --git a/src/graphql/operations/getWebsiteInterface.graphql b/src/graphql/operations/getWebsiteInterface.graphql
index 44d230f..da28efd 100644
--- a/src/graphql/operations/getWebsiteInterface.graphql
+++ b/src/graphql/operations/getWebsiteInterface.graphql
@@ -168,6 +168,8 @@ query getWebsiteInterface($language_code: String) {
cover
tags
no_source_warning
+ copy_anchor_link
+ anchor_link_copied
}
}
}
diff --git a/src/pages/chronicles/[slug]/index.tsx b/src/pages/chronicles/[slug]/index.tsx
index b79a3f9..1f03d53 100644
--- a/src/pages/chronicles/[slug]/index.tsx
+++ b/src/pages/chronicles/[slug]/index.tsx
@@ -111,7 +111,7 @@ const Chronicle = ({
)}
{isDefined(selectedTranslation.body) && (
-
+
)}
>
) : (
@@ -139,7 +139,10 @@ const Chronicle = ({
{selectedContentTranslation.text_set?.text && (
-
+
)}
>
)}
diff --git a/src/pages/contents/[slug]/index.tsx b/src/pages/contents/[slug]/index.tsx
index 9125275..4a39cd8 100644
--- a/src/pages/contents/[slug]/index.tsx
+++ b/src/pages/contents/[slug]/index.tsx
@@ -212,7 +212,10 @@ const Content = ({
)}
@@ -393,7 +396,10 @@ const Content = ({
-
+
{nextContent?.attributes && (
<>
diff --git a/src/pages/dev/editor.tsx b/src/pages/dev/editor.tsx
index 0650fe8..0d87c61 100644
--- a/src/pages/dev/editor.tsx
+++ b/src/pages/dev/editor.tsx
@@ -442,7 +442,7 @@ const Editor = ({ langui, ...otherProps }: Props): JSX.Element => {
diff --git a/src/pages/wiki/chronology.tsx b/src/pages/wiki/chronology.tsx
index 746f5d6..5b576d6 100644
--- a/src/pages/wiki/chronology.tsx
+++ b/src/pages/wiki/chronology.tsx
@@ -210,7 +210,7 @@ const ChronologyEra = ({
{title}
-
+
{isDefinedAndNotEmpty(description) && (
@@ -437,7 +437,7 @@ export const ChronologyEvent = ({
-
+