Skip to content

Commit 6ce28d0

Browse files
aidenybaiamiagent
andcommitted
add restart demo button at bottom of terminal
Generated with [Ami](https://ami.dev) Co-Authored-By: Ami <noreply@ami.dev>
1 parent c36f222 commit 6ce28d0

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

packages/website/src/components/terminal.tsx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use client";
22

33
import { useEffect, useState, useCallback } from "react";
4-
import { Copy, Check, ChevronRight } from "lucide-react";
4+
import { Copy, Check, ChevronRight, RotateCcw } from "lucide-react";
55

66
const COPIED_RESET_DELAY_MS = 2000;
77
const INITIAL_DELAY_MS = 500;
@@ -439,6 +439,23 @@ const Terminal = () => {
439439
</div>
440440
</FadeIn>
441441
)}
442+
443+
{state.showSummary && (
444+
<div className="mt-8">
445+
<button
446+
onClick={() => {
447+
try {
448+
localStorage.removeItem(ANIMATION_COMPLETED_KEY);
449+
} catch {}
450+
location.reload();
451+
}}
452+
className="inline-flex items-center gap-1.5 text-xs text-neutral-600 transition-colors hover:text-neutral-400"
453+
>
454+
<RotateCcw size={12} />
455+
Restart demo
456+
</button>
457+
</div>
458+
)}
442459
</div>
443460
);
444461
};

0 commit comments

Comments
 (0)