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

Show the intro pages for first-time visitors #26

Mergedfukomerged 2 commits intomain fromrefs/pull/26/headmerged by fuko View on GitHub

Showing 2 changed files with 13 additions and 7 deletions.

x
0 of 2 viewed, 2 left
10 additions and 4 deletionssrc/components/HomeIntro.tsxModified
View file
@@ -15,22 +15,28 @@
​
export function HomeIntro({
activeStep,
- show_home_intro,
+ intro,
}: {
activeStep: string | null;
- show_home_intro: "true" | "false" | undefined;
+ intro: "true" | "false" | undefined;
}) {
const [open, setOpen] = useState(
activeStep === null ||
// used for debugging
- show_home_intro === "true",
+ intro === "true",
);
​
const navigate = useNavigate();
​
const startTutorial = useCallback(() => {
setOpen(false);
- navigate({ to: ".", search: ({ show_home_intro, ...o }) => o });
+ navigate({
+ to: ".",
+ search: (o) => ({