From 6ed7dda3ad59ecd76d00184f2efb63a11b3af704 Mon Sep 17 00:00:00 2001 From: kiwihodl Date: Tue, 22 Apr 2025 13:29:41 -0500 Subject: [PATCH] linted and removed duplicate import in VideoDetails --- src/components/ZapThreadsWrapper.js | 2 +- .../content/carousels/templates/CourseTemplate.js | 15 +++++++++------ src/components/content/courses/CourseLesson.js | 3 +-- src/components/content/videos/VideoDetails.js | 1 - src/pages/details/[slug]/index.js | 8 ++++++-- 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/components/ZapThreadsWrapper.js b/src/components/ZapThreadsWrapper.js index e4c36f8..05fb797 100644 --- a/src/components/ZapThreadsWrapper.js +++ b/src/components/ZapThreadsWrapper.js @@ -9,7 +9,7 @@ const ZapThreadsWrapper = ({ anchor, user, relays, disable, className, isAuthori if (!isAuthorized) { return; } - + // Store the current value of zapRef to use in the cleanup function const currentZapRef = zapRef.current; diff --git a/src/components/content/carousels/templates/CourseTemplate.js b/src/components/content/carousels/templates/CourseTemplate.js index 0634b05..7904048 100644 --- a/src/components/content/carousels/templates/CourseTemplate.js +++ b/src/components/content/carousels/templates/CourseTemplate.js @@ -110,8 +110,9 @@ export function CourseTemplate({ course, showMetaTags = true }) {
{course && @@ -142,8 +143,9 @@ export function CourseTemplate({ course, showMetaTags = true }) { )}

{course?.published_at && course.published_at !== '' diff --git a/src/components/content/courses/CourseLesson.js b/src/components/content/courses/CourseLesson.js index ac8504f..3447cce 100644 --- a/src/components/content/courses/CourseLesson.js +++ b/src/components/content/courses/CourseLesson.js @@ -20,8 +20,7 @@ const MDDisplay = dynamic(() => import('@uiw/react-markdown-preview'), { const CourseLesson = ({ lesson, course, decryptionPerformed, isPaid, setCompleted }) => { const [zapAmount, setZapAmount] = useState(0); - const { zaps, zapsLoading, zapsError } = useZapsQuery({ event: lesson, - type: 'lesson' }); + const { zaps, zapsLoading, zapsError } = useZapsQuery({ event: lesson, type: 'lesson' }); const { returnImageProxy } = useImageProxy(); const menuRef = useRef(null); const toastRef = useRef(null); diff --git a/src/components/content/videos/VideoDetails.js b/src/components/content/videos/VideoDetails.js index 84fb37e..c42b263 100644 --- a/src/components/content/videos/VideoDetails.js +++ b/src/components/content/videos/VideoDetails.js @@ -15,7 +15,6 @@ import useWindowWidth from '@/hooks/useWindowWidth'; import dynamic from 'next/dynamic'; import { Toast } from 'primereact/toast'; import MoreOptionsMenu from '@/components/ui/MoreOptionsMenu'; -import { Buffer } from 'buffer'; import ZapThreadsWrapper from '@/components/ZapThreadsWrapper'; import appConfig from '@/config/appConfig'; import { nip19 } from 'nostr-tools'; diff --git a/src/pages/details/[slug]/index.js b/src/pages/details/[slug]/index.js index b862c9b..ff3447c 100644 --- a/src/pages/details/[slug]/index.js +++ b/src/pages/details/[slug]/index.js @@ -220,7 +220,9 @@ const Details = () => { user={nsec || npub || null} relays="wss://nos.lol/, wss://relay.damus.io/, wss://relay.snort.social/, wss://relay.nostr.band/, wss://relay.primal.net/, wss://nostrue.com/, wss://purplerelay.com/, wss://relay.devs.tools/" disable="zaps" - isAuthorized={!event.price || decryptedContent || session?.user?.role?.subscribed || authorView} + isAuthorized={ + !event.price || decryptedContent || session?.user?.role?.subscribed || authorView + } />

) : nAddress !== null ? ( @@ -230,7 +232,9 @@ const Details = () => { user={npub} relays="wss://nos.lol/, wss://relay.damus.io/, wss://relay.snort.social/, wss://relay.nostr.band/, wss://relay.primal.net/, wss://nostrue.com/, wss://purplerelay.com/, wss://relay.devs.tools/" disable="zaps" - isAuthorized={!event.price || decryptedContent || session?.user?.role?.subscribed || authorView} + isAuthorized={ + !event.price || decryptedContent || session?.user?.role?.subscribed || authorView + } /> ) : null}