From 0951384a4c1ae6e78b694ea8a179ea40b023cab7 Mon Sep 17 00:00:00 2001 From: William Jedrzejczak Date: Tue, 19 Mar 2024 15:11:41 -0400 Subject: [PATCH] Added a container for assignment.js (more to come soon) --- components/student/assignment.js | 84 +++++++++++++++----------------- 1 file changed, 38 insertions(+), 46 deletions(-) diff --git a/components/student/assignment.js b/components/student/assignment.js index 9710ab4..4b646b4 100644 --- a/components/student/assignment.js +++ b/components/student/assignment.js @@ -2,6 +2,7 @@ import Nav from 'react-bootstrap/Nav'; import Button from 'react-bootstrap/Button'; import Col from 'react-bootstrap/Col'; import Row from 'react-bootstrap/Row'; +import Container from 'react-bootstrap/Container'; import { FaBook, FaDrum, FaGuitar, FaLink, FaPenFancy } from 'react-icons/fa'; import ListGroup from 'react-bootstrap/ListGroup'; import Spinner from 'react-bootstrap/Spinner'; @@ -20,7 +21,7 @@ export default function StudentAssignment({ children, assignment }) { const router = useRouter(); const { slug, piece, actCategory = 'Create', partType } = router.query; - + const { isLoading, isIdle, @@ -34,7 +35,6 @@ export default function StudentAssignment({ children, assignment }) { } ); - // const const composer = assignment?.part?.piece?.composer?.name; const composerCheat = composer?.split(' ').pop(); const connectLink = `Connect ${composerCheat}`; @@ -43,49 +43,41 @@ export default function StudentAssignment({ children, assignment }) { const pieceName = assignment?.piece_name ?? assignment?.part?.piece?.name; return ( - - {assignment && assignment?.id && pieceName ? ( - - {/* piece subnav (navigate to next/other activity, else?) */} - {/* moved to navbar */} - -

- {(actCategory == 'Perform' || actCategory == 'Create') && - `${actCategory} `} - {assignment?.activity?.activity_type?.name} Activity -

- - {assignment.submissions.length > 0 ? ( - - - Current Submission - - - - - {/* tasks */} - - Submit Again? - {children} - - - ) : ( - children - )} - -
- ) : ( - - )} + + + {assignment && assignment.id && pieceName ? ( + + +

+ {(actCategory == 'Perform' || actCategory == 'Create') && + `${actCategory} `} + {assignment?.activity?.activity_type?.name} Activity +

+ + {assignment.submissions.length > 0 ? ( + + + Current Submission + + + + + + Submit Again? + {children} + + + ) : ( + children + )} + +
+ ) : ( + + )} +
); -} +} \ No newline at end of file