diff --git a/src/Tools/_framework/ToolPanels/HomePanel.jsx b/src/Tools/_framework/ToolPanels/HomePanel.jsx
index bb23dad877..254833978d 100644
--- a/src/Tools/_framework/ToolPanels/HomePanel.jsx
+++ b/src/Tools/_framework/ToolPanels/HomePanel.jsx
@@ -1,28 +1,18 @@
import React, { useEffect, useRef } from 'react';
import { useNavigate } from 'react-router-dom'
-import Cookies from 'js-cookie'; // import Textinput from "../imports/Textinput";
+// import Cookies from 'js-cookie'; // import Textinput from "../imports/Textinput";
import styled from 'styled-components';
import './homepage.css';
import Button from '../../../_reactComponents/PanelHeaderComponents/Button';
-import DoenetDriveCard from '../../../_reactComponents/Drive/DoenetDriveCard';
+// import DoenetDriveCard from '../../../_reactComponents/Drive/DoenetDriveCard';
import { checkIfUserClearedOut } from '../../../_utils/applicationUtils';
import { useState } from 'react';
+import PageViewer from '../../../Viewer/PageViewer';
+import { pageVariantInfoAtom, pageVariantPanelAtom } from '../../../_sharedRecoil/PageViewerRecoil';
+import { useRecoilState, useSetRecoilState } from 'recoil';
-
-const LightBlueColor = styled.div`
-background-color: var(--lightBlue);
-color: black;
-`;
-const LightBlueColorSection = styled(LightBlueColor)`
- padding: 20px 10px 60px 10px;
- margin: 0px;
- justify-content: center;
- align-items: center;
- text-align: center;
-`;
-
const SectionText = styled.div`
text-align: center;
max-width: 800px;
@@ -100,12 +90,18 @@ function Heading(props) {
}
+
+
export default function HomePage(props) {
// console.log(">>>===HomePage")
let navigate = useNavigate();
const [signedIn, setSignedIn] = useState(null);
let checkingCookie = useRef(false);
+ const setVariantPanel = useSetRecoilState(pageVariantPanelAtom);
+ const [variantInfo, setVariantInfo] = useRecoilState(pageVariantInfoAtom);
+
+
const videoEl = useRef(null);
const attemptPlay = () => {
@@ -120,6 +116,18 @@ export default function HomePage(props) {
attemptPlay();
}, []);
+ function variantCallback(generatedVariantInfo, allPossibleVariants) {
+ // console.log(">>>variantCallback",generatedVariantInfo,allPossibleVariants)
+ const cleanGeneratedVariant = JSON.parse(JSON.stringify(generatedVariantInfo))
+ setVariantPanel({
+ index: cleanGeneratedVariant.index,
+ allPossibleVariants,
+ });
+ setVariantInfo({
+ index: cleanGeneratedVariant.index,
+ });
+ }
+
//Only ask once
if (!checkingCookie.current) {
checkingCookie.current = true;
@@ -193,42 +201,76 @@ export default function HomePage(props) {
One benefit of using Doenet during in-class activities is the immediate feedback + students receive even before an instructor can come by their group.
+