saving fix

This commit is contained in:
wrzesinski-hubert 2021-01-25 17:43:02 +01:00
parent a72fb6b12c
commit 0ecdc6db20

View File

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