Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions src/components/Study/SpeakComingSoon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import type { ComponentProps } from "react";
import { MicIcon, XIcon } from "lucide-react";
import { useLocalStorage } from "usehooks-ts";
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
import { Button } from "@/components/ui/button";

const SpeakComingSoon = ({ ...props }: ComponentProps<typeof Alert>) => {
const [dismissed, setDismissed] = useLocalStorage(
"englitune-speak-coming-soon",
false
);

return (
!dismissed && (
<Alert {...props}>
<MicIcon />
<AlertTitle className="space-x-1.5">
<span>Coming soon!</span>
<span>{"\u{1F680}"}</span>
</AlertTitle>
<AlertDescription>
AI-powered speak practice to boost your pronunciation.
</AlertDescription>
<Button
variant="ghost"
size="icon-sm"
className="absolute top-2 right-2"
onClick={() => setDismissed(true)}
>
<XIcon />
<span className="sr-only">Dismiss</span>
</Button>
</Alert>
)
);
};

export default SpeakComingSoon;
2 changes: 2 additions & 0 deletions src/components/Study/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Header from "@/components/Study/Header";
import Audio from "@/components/Audio";
import Info from "@/components/Study/Info";
import Transcript from "@/components/Study/Transcript";
import SpeakComingSoon from "@/components/Study/SpeakComingSoon";
import { getAudioUrl, translate } from "@/lib/utils";
import useStudy from "@/hooks/useStudy";
import useReviews from "@/hooks/useReviews";
Expand Down Expand Up @@ -71,6 +72,7 @@ const Study = () => {
{entry.transcript}
</Transcript>
)}
<SpeakComingSoon />
</Container>
);
};
Expand Down