Skip to content
Source
Sign inSign up
fuko/trytanstackdb.com

Fix the visibility of the intro state #36

Mergedfukomerged 6 commits intomain fromrefs/pull/36/headmerged by fuko View on GitHub

Showing 6 changed files with 16 additions and 35 deletions (loading 3).

x
0 of 6 viewed, 6 left
8 additions and 14 deletionssrc/components/HomeIntro.tsxModified
View file
@@ -1,8 +1,8 @@
-import { useNavigate } from "@tanstack/react-router";
import { ArrowRightIcon, DatabaseZap } from "lucide-react";
import { AnimatePresence, motion, stagger, type Variants } from "motion/react";
-import { type ReactNode, useCallback, useState } from "react";
+import { type ReactNode, useCallback, useMemo, useState } from "react";
import { cn } from "@/lib/utils";
+import { getShowIntro } from "@/utils/getShowIntro";
import { Button } from "./ui/button";
import {
Card,
@@ -62,29 +62,23 @@
​
export function HomeIntro({
activeStep,
- intro,
+ showIntro,
}: {
activeStep: string | null;
- intro: "true" | "false" | undefined;
+ showIntro: boolean;
}) {
const [open, setOpen] = useState(
activeStep === null ||
// used for debugging
- intro === "true",