clean up unused

This commit is contained in:
austinkelsay 2025-04-20 17:31:40 -05:00
parent 86f010cf62
commit 38bb4b79cd
No known key found for this signature in database
GPG Key ID: 5A763922E5BA08EE

View File

@ -20,11 +20,8 @@ const MDDisplay = dynamic(() => import('@uiw/react-markdown-preview'), {
const CourseLesson = ({ lesson, course, decryptionPerformed, isPaid, setCompleted }) => {
const [zapAmount, setZapAmount] = useState(0);
const [nAddress, setNAddress] = useState(null);
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);
@ -116,18 +113,6 @@ const CourseLesson = ({ lesson, course, decryptionPerformed, isPaid, setComplete
}
}, [isCompleted, isTracking, lesson.id, setCompleted]);
useEffect(() => {
if (lesson) {
const addr = nip19.naddrEncode({
pubkey: lesson.pubkey,
kind: lesson.kind,
identifier: lesson.d,
relays: appConfig.defaultRelayUrls,
});
setNAddress(addr);
}
}, [lesson]);
const renderContent = () => {
if (isPaid && decryptionPerformed) {
return <MDDisplay className="p-4 rounded-lg w-full" source={lesson.content} />;