fix bug and show prompt
This commit is contained in:
parent
0e8eef4554
commit
874afc1e66
@ -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."
|
||||
);
|
||||
|
||||
@ -30,7 +30,7 @@ export default function HistoryDisplay({
|
||||
}: Props) {
|
||||
return history.length === 0 ? null : (
|
||||
<div className="flex flex-col h-screen">
|
||||
<h1 className="font-bold mb-2">History</h1>
|
||||
<h1 className="font-bold mb-2">Versions</h1>
|
||||
<ScrollArea className="flex-1 overflow-y-auto">
|
||||
<ul className="space-y-0 flex flex-col-reverse">
|
||||
{history.map((item, index) => (
|
||||
@ -58,6 +58,11 @@ export default function HistoryDisplay({
|
||||
<h2 className="text-sm">(parent: v{item.parent + 1})</h2>
|
||||
)}
|
||||
</div>
|
||||
<h2 className="text-sm">
|
||||
{item.type === "ai_edit"
|
||||
? item.inputs.prompt
|
||||
: item.inputs.image_url}
|
||||
</h2>
|
||||
<h2 className="text-sm">v{index + 1}</h2>
|
||||
</li>
|
||||
))}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user