Merge pull request 'saving fix' (#63) from statistics into master

Reviewed-on: http://git.plannaplan.pl/y0rune/frontend/pulls/63
Reviewed-by: filipizydorczyk <filip.izydorczyk@protonmail.com>
This commit is contained in:
filipizydorczyk 2021-01-25 17:41:49 +01:00
commit a229f0cd6d

View File

@ -53,7 +53,7 @@ export const Rightbar = () => {
const handleSave = debounce(() => saveBasket(userID), 500); const handleSave = debounce(() => saveBasket(userID), 500);
return ( return (
<RightbarWrapper> <RightbarWrapper>
<SaveButton onClick={handleSave}> {isSavingLoading ? <SyncLoader size={9}/> : "ZAPISZ"}</SaveButton> <SaveButton onClick={()=> {!isSavingLoading && handleSave() }}> {isSavingLoading ? <SyncLoader size={9}/> : "ZAPISZ"}</SaveButton>
{basketCourses.map((course) => ( {basketCourses.map((course) => (
<CourseCard course={course} key={course.id} /> <CourseCard course={course} key={course.id} />
))} ))}