Elffuss BraidHub

kikocis/continue public

b6f6b229557f · 685 BRawPermalink
1import { useEffect } from "react";
2import { useDispatch } from "react-redux";
3import { useAppSelector } from "../../redux/hooks";
4import { setDialogMessage, setShowDialog } from "../../redux/slices/uiSlice";
5import { OnboardingCard } from "../OnboardingCard";
6
7function FreeTrialOverDialog() {
8 const dispatch = useDispatch();
9 const history = useAppSelector((store) => store.session.history);
10
11 useEffect(() => {
12 if (history.length === 0) {
13 dispatch(setShowDialog(false));
14 dispatch(setDialogMessage(undefined));
15 }
16 }, [history]);
17
18 return (
19 <div className="flex-1">
20 <OnboardingCard isDialog />
21 </div>
22 );
23}
24
25export default FreeTrialOverDialog;