mocked saveBasket to backend

This commit is contained in:
Maciek Głowacki
2020-10-01 20:06:38 +02:00
parent d6aa58fd34
commit ffce67ab42
2 changed files with 15 additions and 9 deletions

View File

@ -42,10 +42,13 @@ const SaveButton = styled.div`
height: 40px;
background-color: red;
margin-bottom: 10px;
&:hover {
color: #d3d3d3;
}
`;
export const Rightbar = () => {
const { courses, basket } = useContext(coursesContext)!;
const { courses, basket, saveBasket } = useContext(coursesContext)!;
const getBasketGroups = () => {
const names = basket.map(({ name }) => name);
@ -62,7 +65,7 @@ export const Rightbar = () => {
Hubert Wrzesiński<br></br>
Semestr zimowy 2020/2021
</p>
<SaveButton>SAVE</SaveButton>
<SaveButton onClick={saveBasket}>SAVE</SaveButton>
</RightbarTextStyled>
{filteredCourses.map((course, index) => (
<CourseCard course={course} key={index} />