diff --git a/src/components/AnchorShare.tsx b/src/components/AnchorShare.tsx new file mode 100644 index 0000000..a367f1d --- /dev/null +++ b/src/components/AnchorShare.tsx @@ -0,0 +1,37 @@ +import { useRouter } from "next/router"; +import { Ico, Icon } from "./Ico"; +import { ToolTip } from "./ToolTip"; + +/* + * ╭─────────────╮ + * ───────────────────────────────────────╯ COMPONENT ╰─────────────────────────────────────────── + */ + +interface Props { + id: string; +} + +// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ + +export const AnchorShare = ({ id }: Props): JSX.Element => ( + + {/* TODO: Langui Copied! */} + + { + navigator.clipboard.writeText( + `${ + process.env.NEXT_PUBLIC_URL_SELF + window.location.pathname + }#${id}` + ); + }} + /> + + +); diff --git a/src/components/Chronicles/ChroniclesList.tsx b/src/components/Chronicles/ChroniclesList.tsx index 1ba2bb1..c439e4f 100644 --- a/src/components/Chronicles/ChroniclesList.tsx +++ b/src/components/Chronicles/ChroniclesList.tsx @@ -47,7 +47,7 @@ export const ChroniclesList = ({
{filterHasAttributes(chronicles, [ diff --git a/src/components/Inputs/LanguageSwitcher.tsx b/src/components/Inputs/LanguageSwitcher.tsx index dd00893..7e71a00 100644 --- a/src/components/Inputs/LanguageSwitcher.tsx +++ b/src/components/Inputs/LanguageSwitcher.tsx @@ -19,6 +19,7 @@ interface Props { localesIndex: number | undefined; onLanguageChanged: (index: number) => void; size?: Parameters[0]["size"]; + showBadge?: boolean; } // ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ @@ -30,6 +31,7 @@ export const LanguageSwitcher = ({ languages, size, onLanguageChanged, + showBadge = true, }: Props): JSX.Element => (