mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-06-03 07:42:03 +00:00
clean up unused
This commit is contained in:
parent
86f010cf62
commit
38bb4b79cd
@ -20,11 +20,8 @@ const MDDisplay = dynamic(() => import('@uiw/react-markdown-preview'), {
|
|||||||
|
|
||||||
const CourseLesson = ({ lesson, course, decryptionPerformed, isPaid, setCompleted }) => {
|
const CourseLesson = ({ lesson, course, decryptionPerformed, isPaid, setCompleted }) => {
|
||||||
const [zapAmount, setZapAmount] = useState(0);
|
const [zapAmount, setZapAmount] = useState(0);
|
||||||
const [nAddress, setNAddress] = useState(null);
|
const { zaps, zapsLoading, zapsError } = useZapsQuery({ event: lesson,
|
||||||
const { zaps, zapsLoading, zapsError } = useZapsQuery({
|
type: 'lesson' });
|
||||||
event: lesson,
|
|
||||||
type: 'lesson',
|
|
||||||
});
|
|
||||||
const { returnImageProxy } = useImageProxy();
|
const { returnImageProxy } = useImageProxy();
|
||||||
const menuRef = useRef(null);
|
const menuRef = useRef(null);
|
||||||
const toastRef = useRef(null);
|
const toastRef = useRef(null);
|
||||||
@ -116,18 +113,6 @@ const CourseLesson = ({ lesson, course, decryptionPerformed, isPaid, setComplete
|
|||||||
}
|
}
|
||||||
}, [isCompleted, isTracking, lesson.id, setCompleted]);
|
}, [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 = () => {
|
const renderContent = () => {
|
||||||
if (isPaid && decryptionPerformed) {
|
if (isPaid && decryptionPerformed) {
|
||||||
return <MDDisplay className="p-4 rounded-lg w-full" source={lesson.content} />;
|
return <MDDisplay className="p-4 rounded-lg w-full" source={lesson.content} />;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user