fix(web): Remove duplicate DictationOverlay that conflicted with LiveDemo

The old DictationOverlay was still responding to double-tap Ctrl alongside
the new LiveDemo component, causing two overlays to appear simultaneously.
Removed the page-level useDoublePress hook and DictationOverlay since the
LiveDemo now handles double-tap Ctrl detection internally.
This commit is contained in:
jatinkrmalik
2026-01-19 16:54:45 -08:00
parent d57bc82bc3
commit 162824e6f1
-12
View File
@@ -3,8 +3,6 @@
import React, { useState, useEffect, useCallback } from "react";
import { motion } from "framer-motion";
import Image from "next/image";
import { useDoublePress } from "@/hooks/use-double-press";
import { DictationOverlay } from "@/components/dictation-overlay";
import { LiveDemo } from "@/components/live-demo";
import {
Mic,
@@ -133,13 +131,6 @@ export default function HomePage() {
const [stars, setStars] = useState<number | null>(null);
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
const { isActive: isDictating, resetActive: resetDictation } = useDoublePress({
key: "Control",
onDoublePress: () => {
console.log("Double Ctrl press detected!");
},
});
useEffect(() => {
// Fetch actual GitHub stars
fetch("https://api.github.com/repos/jatinkrmalik/vocalinux")
@@ -165,9 +156,6 @@ export default function HomePage() {
return (
<main className="min-h-screen bg-gradient-to-b from-zinc-50 to-white dark:from-zinc-900 dark:to-zinc-950">
{/* Dictation Overlay */}
<DictationOverlay isActive={isDictating} onAnimationComplete={resetDictation} />
{/* Header */}
<header className="fixed top-0 left-0 right-0 z-50 bg-background/80 backdrop-blur-md border-b border-border">
<nav className="max-w-7xl mx-auto px-4 sm:px-6 py-3 flex items-center justify-between">