diff --git a/src/components/LessonPlanCreate.jsx b/src/components/LessonPlanCreate.jsx index d405d41..0163f48 100644 --- a/src/components/LessonPlanCreate.jsx +++ b/src/components/LessonPlanCreate.jsx @@ -1,3 +1,4 @@ +import Container from "react-bootstrap/Container"; import Col from "react-bootstrap/Col"; import Row from "react-bootstrap/Row"; import Image from "react-bootstrap/Image"; @@ -42,14 +43,17 @@ export const LessonPlanCreate = () => { const [lessonPlan, setLessonPlan] = useState(lessonPlanTemplate); const [authorised, setAuthorised] = useState(false); - + useEffect(() => { if (user._id === userId) { setAuthorised(true); } if (!lessonApiRef.current) { - lessonApiRef.current = new LessonPlanAPI(import.meta.env.VITE_API_ENDPOINT, userId); + lessonApiRef.current = new LessonPlanAPI( + import.meta.env.VITE_API_ENDPOINT, + userId + ); } }, [user, userId, authorised]); @@ -114,38 +118,38 @@ export const LessonPlanCreate = () => { return ( <> - - - - - - - + + + + + + + + + - + New Lesson Plan
- + - - - + diff --git a/src/components/LessonPlanView.jsx b/src/components/LessonPlanView.jsx index 93a50f6..5f17c3f 100644 --- a/src/components/LessonPlanView.jsx +++ b/src/components/LessonPlanView.jsx @@ -1,3 +1,8 @@ +import data from "../../data/user.json"; + +import { Link, useParams } from "react-router-dom"; + +import Container from "react-bootstrap/Container"; import Col from "react-bootstrap/Col"; import Row from "react-bootstrap/Row"; import Image from "react-bootstrap/Image"; @@ -5,10 +10,6 @@ import Button from "react-bootstrap/Button"; import Nav from "react-bootstrap/Nav"; import Tab from "react-bootstrap/Tab"; import Card from "react-bootstrap/Card"; -// import PropTypes from "prop-types"; -import data from "../../data/user.json"; -import { Link } from "react-router-dom"; -import { useParams } from "react-router-dom"; export const LessonPlanView = () => { const lessonPlan = data[0].lesson_plans[0]; @@ -16,37 +17,39 @@ export const LessonPlanView = () => { return ( <> - - - - - - - + + + + + + + + + - + Lesson Plan - +

{lessonPlan.topic}

- + - +
@@ -132,15 +135,29 @@ export const LessonPlanView = () => { diff --git a/src/components/Profile.jsx b/src/components/Profile.jsx index d8a6714..f744f0d 100644 --- a/src/components/Profile.jsx +++ b/src/components/Profile.jsx @@ -49,8 +49,8 @@ export const Profile = () => { }; return ( - - + +

My Lesson Plans @@ -64,7 +64,7 @@ export const Profile = () => { - +
#