From 874afc1e665a68b02e1cb8ac04a6385b1af13169 Mon Sep 17 00:00:00 2001 From: Abi Raja Date: Thu, 7 Dec 2023 09:22:22 -0500 Subject: [PATCH] fix bug and show prompt --- frontend/src/App.tsx | 2 +- frontend/src/components/history/HistoryDisplay.tsx | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 802e960..ff7c83c 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -155,7 +155,7 @@ function App() { } else { setAppHistory((prev) => { // Validate parent version - if (!parentVersion) { + if (parentVersion === null) { toast.error( "No parent version set. Contact support or open a Github issue." ); diff --git a/frontend/src/components/history/HistoryDisplay.tsx b/frontend/src/components/history/HistoryDisplay.tsx index f28a300..aa00920 100644 --- a/frontend/src/components/history/HistoryDisplay.tsx +++ b/frontend/src/components/history/HistoryDisplay.tsx @@ -30,7 +30,7 @@ export default function HistoryDisplay({ }: Props) { return history.length === 0 ? null : (
-

History

+

Versions

    {history.map((item, index) => ( @@ -58,6 +58,11 @@ export default function HistoryDisplay({

    (parent: v{item.parent + 1})

    )}
+

+ {item.type === "ai_edit" + ? item.inputs.prompt + : item.inputs.image_url} +

v{index + 1}

))}