From 2fb8040d6373f2cddf75fa3bb69de52ac1d6f742 Mon Sep 17 00:00:00 2001 From: squaresmile Date: Fri, 8 Mar 2024 22:15:41 -0500 Subject: [PATCH] Added quest original name to quest page --- packages/api-connector/src/Schema/Quest.ts | 1 + .../db/src/Component/QuestSummaryTable.tsx | 21 +++++++++++++++++++ packages/db/src/Page/Quest/QuestSubData.tsx | 5 +++++ 3 files changed, 27 insertions(+) create mode 100644 packages/db/src/Component/QuestSummaryTable.tsx diff --git a/packages/api-connector/src/Schema/Quest.ts b/packages/api-connector/src/Schema/Quest.ts index 430cbc9d..610ae759 100644 --- a/packages/api-connector/src/Schema/Quest.ts +++ b/packages/api-connector/src/Schema/Quest.ts @@ -245,6 +245,7 @@ export interface QuestPhaseRestriction { export interface Quest { id: number; name: string; + originalName: string; type: QuestType; flags: QuestFlag[]; consumeType: QuestConsumeType; diff --git a/packages/db/src/Component/QuestSummaryTable.tsx b/packages/db/src/Component/QuestSummaryTable.tsx new file mode 100644 index 00000000..45c73ca6 --- /dev/null +++ b/packages/db/src/Component/QuestSummaryTable.tsx @@ -0,0 +1,21 @@ +import { Table } from "react-bootstrap"; +import { useTranslation } from "react-i18next"; + +import { Quest } from "@atlasacademy/api-connector"; + +export const QuestSummaryTable = ({ quest }: { quest: Quest.Quest }) => { + const { t } = useTranslation(); + + return ( + <> + + + + + + +
+
+ + ); +}; diff --git a/packages/db/src/Page/Quest/QuestSubData.tsx b/packages/db/src/Page/Quest/QuestSubData.tsx index 2fb00efc..7030e6e8 100644 --- a/packages/db/src/Page/Quest/QuestSubData.tsx +++ b/packages/db/src/Page/Quest/QuestSubData.tsx @@ -105,6 +105,11 @@ const QuestSubData = ({ region, quest }: { region: Region; quest: Quest.QuestPha quest.stages.length === 0 || quest.enemyHash === undefined, }, + { + label: t("Original Name"), + value: <>{quest.originalName}, + hidden: quest.name === quest.originalName, + }, { label: t("Chaldea App"), value: (