mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-05-24 02:42:03 +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
|
decryptionPerformed
|
||||||
});
|
});
|
||||||
|
|
||||||
if (paidCourse === false || (paidCourse && decryptionPerformed)) {
|
if (!paidCourse || (paidCourse && decryptionPerformed)) {
|
||||||
console.log('📝 [useTrackCourse] Creating new course entry');
|
console.log('📝 [useTrackCourse] Creating new course entry');
|
||||||
await axios.post(`/api/users/${session.user.id}/courses?courseSlug=${courseId}`, {
|
await axios.post(`/api/users/${session.user.id}/courses?courseSlug=${courseId}`, {
|
||||||
completed: false,
|
completed: false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user