mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-04-19 19:01:19 +00:00
fix condition in course tracking hook
This commit is contained in:
parent
5476898b70
commit
9213982125
@ -30,7 +30,7 @@ const useTrackCourse = ({courseId, paidCourse, decryptionPerformed}) => {
|
||||
decryptionPerformed
|
||||
});
|
||||
|
||||
if (paidCourse === false || (paidCourse && decryptionPerformed)) {
|
||||
if (!paidCourse || (paidCourse && decryptionPerformed)) {
|
||||
console.log('📝 [useTrackCourse] Creating new course entry');
|
||||
await axios.post(`/api/users/${session.user.id}/courses?courseSlug=${courseId}`, {
|
||||
completed: false,
|
||||
|
Loading…
x
Reference in New Issue
Block a user