diff --git a/src/Tools/_framework/Paths/Portfolio.jsx b/src/Tools/_framework/Paths/Portfolio.jsx index 65f2dbbc20..b28a1647af 100644 --- a/src/Tools/_framework/Paths/Portfolio.jsx +++ b/src/Tools/_framework/Paths/Portfolio.jsx @@ -7,6 +7,7 @@ import Button from '../../../_reactComponents/PanelHeaderComponents/Button'; import { GoKebabVertical } from 'react-icons/go'; import { itemByDoenetId, useCourse } from '../../../_reactComponents/Course/CourseActions'; import { useSetRecoilState } from 'recoil'; +import { pageToolViewAtom } from '../NewToolRoot'; export async function action({request}) { const formData = await request.formData(); @@ -122,6 +123,8 @@ function Card({ //TODO: find the courseId const setItemByDoenetId = useSetRecoilState(itemByDoenetId(doenetId)); const { compileActivity, updateAssignItem } = useCourse(courseId); + const setPageToolView = useSetRecoilState(pageToolViewAtom); + // const activityLink = `/portfolio/${doenetId}/editor`; const activityLink = `/portfolioeditor/${doenetId}?tool=editor&doenetId=${doenetId}&pageId=${pageDoenetId}`; @@ -143,7 +146,14 @@ function Card({ - + { + setPageToolView({ + page: 'portfolioeditor', + tool: 'editor', + view: '', + params:{}, + }); + }}> Portfolio
-
diff --git a/src/Tools/_framework/Paths/SiteHeader.jsx b/src/Tools/_framework/Paths/SiteHeader.jsx index 5264d13acd..610a113759 100644 --- a/src/Tools/_framework/Paths/SiteHeader.jsx +++ b/src/Tools/_framework/Paths/SiteHeader.jsx @@ -2,9 +2,11 @@ import { Box } from '@chakra-ui/react'; import React, { useRef, useState } from 'react'; import { Outlet, useLoaderData, useNavigate } from 'react-router'; import { NavLink } from 'react-router-dom'; +import { useSetRecoilState } from 'recoil'; import styled from 'styled-components'; import Button from '../../../_reactComponents/PanelHeaderComponents/Button'; import { checkIfUserClearedOut } from '../../../_utils/applicationUtils'; +import { pageToolViewAtom } from '../NewToolRoot'; import RouterLogo from '../RouterLogo'; @@ -103,8 +105,17 @@ function MenuItem({to,children}){ export function SiteHeader(props) { let navigate = useNavigate(); let data = useLoaderData(); + const setPageToolView = useSetRecoilState(pageToolViewAtom); - let signInButton =