mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-06-05 00:32:03 +00:00
Clean up console logs
This commit is contained in:
parent
9e4390de1f
commit
103286d8a9
@ -20,9 +20,7 @@ const ProgressListItem = ({ dTag, category, type = 'course' }) => {
|
||||
authors: appConfig.authorPubkeys,
|
||||
"#d": [dTag],
|
||||
}
|
||||
console.log("filter", filter);
|
||||
const event = await ndk.fetchEvent(filter);
|
||||
console.log("event", event);
|
||||
if (event) {
|
||||
setEvent(type === 'course' ? parseCourseEvent(event) : parseEvent(event));
|
||||
}
|
||||
|
@ -77,7 +77,6 @@ const PublishedCourseForm = ({ course }) => {
|
||||
if (!ndk.signer) {
|
||||
await addSigner();
|
||||
}
|
||||
console.log('lessons', lessons);
|
||||
|
||||
const event = new NDKEvent(ndk);
|
||||
event.kind = course.kind;
|
||||
|
@ -23,8 +23,6 @@ const UserBadges = ({ visible, onHide }) => {
|
||||
// todo: add the plebdevs hardcoded badge ids (probably in config?)
|
||||
ids: ["4054a68f028edf38cd1d71cc4693d4ff5c9c54b0b44532361fe6abb29530cbf6", "5d38fea9a3c1fb4c55c9635c3132d34608c91de640f772438faa1942677087a8", "3ba20936d66523adb6d71793649bc77f3cea34f50c21ec7bb2c041f936022214", "41edee5af6d4e833d11f9411c2c27cc48c14d2a3c7966ae7648568e825eda1ed"]
|
||||
});
|
||||
|
||||
console.log("Badge Definitions: ", badgeDefinitions);
|
||||
|
||||
// Fetch badge awards (kind 8) using fetchEvents instead of subscribe
|
||||
const badgeAwards = await ndk.fetchEvents({
|
||||
@ -61,8 +59,6 @@ const UserBadges = ({ visible, onHide }) => {
|
||||
})
|
||||
};
|
||||
|
||||
console.log("Current Badge: ", currentBadge);
|
||||
|
||||
// Only update if this is the first instance or if it's newer than the existing one
|
||||
if (!latestBadgeMap.has(defId) ||
|
||||
new Date(currentBadge.awardedOn) > new Date(latestBadgeMap.get(defId).awardedOn)) {
|
||||
|
@ -81,11 +81,9 @@ const useTrackVideoLesson = ({lessonId, videoDuration, courseId, videoPlayed, pa
|
||||
const alreadyCompleted = await checkOrCreateUserLesson();
|
||||
if (!alreadyCompleted && videoDuration && !completedRef.current && videoPlayed && (paidCourse === false || (paidCourse && decryptionPerformed))) {
|
||||
setIsTracking(true);
|
||||
console.log('🎥 Starting video tracking - Duration:', videoDuration);
|
||||
timerRef.current = setInterval(() => {
|
||||
setTimeSpent(prevTime => {
|
||||
const newTime = prevTime + 1;
|
||||
console.log(`⏱️ Time spent: ${newTime}s / ${videoDuration}s (${((newTime/videoDuration)*100).toFixed(1)}%)`);
|
||||
return newTime;
|
||||
});
|
||||
}, 1000);
|
||||
|
@ -188,7 +188,6 @@ export const authOptions = {
|
||||
|
||||
// Update the user with the new keypair
|
||||
const createdUser = await createUser(newUser);
|
||||
console.log("Created user", createdUser);
|
||||
return createdUser;
|
||||
} else {
|
||||
console.log("User already exists", existingUser);
|
||||
@ -277,7 +276,6 @@ export const authOptions = {
|
||||
|
||||
// nostr login (we have no privkey)
|
||||
if (account?.provider === "github" && user?.id && user?.pubkey) {
|
||||
console.log("GITHUB LOGIN");
|
||||
try {
|
||||
// First check if there's already a GitHub account linked
|
||||
const existingGithubAccount = await prisma.account.findFirst({
|
||||
@ -291,7 +289,6 @@ export const authOptions = {
|
||||
token.githubUsername = profile?.login || profile?.name;
|
||||
|
||||
if (!existingGithubAccount) {
|
||||
console.log("No existing GitHub account found");
|
||||
// Update user profile with GitHub info
|
||||
const updatedUser = await updateUser(user.id, {
|
||||
name: profile?.login || profile?.name,
|
||||
|
@ -128,8 +128,6 @@ export default async function handler(req, res) {
|
||||
// Finalize (sign) the event
|
||||
const signedEvent = finalizeEvent(eventTemplate, signingKeyBytes);
|
||||
|
||||
console.log("Signed Event: ", signedEvent);
|
||||
|
||||
// Verify the event
|
||||
const isValid = verifyEvent(signedEvent);
|
||||
if (!isValid) {
|
||||
@ -143,7 +141,6 @@ export default async function handler(req, res) {
|
||||
try {
|
||||
await Promise.any(pool.publish(appConfig.defaultRelayUrls, signedEvent));
|
||||
published = true;
|
||||
console.log('Event published to at least one relay');
|
||||
} catch (error) {
|
||||
throw new Error('Failed to publish to any relay');
|
||||
} finally {
|
||||
|
Loading…
x
Reference in New Issue
Block a user