diff --git a/client/src/components/modals/CardModals/TextModal.tsx b/client/src/components/modals/CardModals/TextModal.tsx index 70ead06..3237da2 100644 --- a/client/src/components/modals/CardModals/TextModal.tsx +++ b/client/src/components/modals/CardModals/TextModal.tsx @@ -14,7 +14,7 @@ const RichText = ({ text, isExpanded, emojiMap }: { text: string; isExpanded: bo return ( <> {content.map((line, i) => ( -
+
') ? 'text-sky-300' : ''}> {line.split(' ').map((word, j) => { if (emojiMap[word]) { return {word}; diff --git a/client/src/components/modals/CheckMobile/CheckMobile.tsx b/client/src/components/modals/CheckMobile/CheckMobile.tsx index cde1aa1..02523bb 100644 --- a/client/src/components/modals/CheckMobile/CheckMobile.tsx +++ b/client/src/components/modals/CheckMobile/CheckMobile.tsx @@ -60,13 +60,15 @@ export default function CombinedIntroAndMobile() {
diff --git a/client/src/hooks/processedEvents.ts b/client/src/hooks/processedEvents.ts index 9cce245..6175678 100644 --- a/client/src/hooks/processedEvents.ts +++ b/client/src/hooks/processedEvents.ts @@ -55,14 +55,20 @@ const useProcessedEvents = (id?: string, filterDifficulty: number = 0) => { if (event.kind === 6) { const parsedEvent = JSON.parse(event.content); const replies = repliesMap.get(parsedEvent.id) || []; - const totalWork = Math.pow(2, pow) + replies.reduce((acc, reply) => acc + Math.pow(2, verifyPow(reply)), 0); + const totalWork = Math.pow(2, pow) + replies.reduce((acc, reply) => { + const replyPow = reply.id.startsWith('0') ? verifyPow(reply) : 0; + return acc + Math.pow(2, replyPow); + }, 0); const metadataEvent = metadataEvents.find(e => e.pubkey === parsedEvent.pubkey && e.kind === 0) || null; return { postEvent: event, replies, totalWork, metadataEvent }; } const replies = repliesMap.get(event.id) || []; - const totalWork = Math.pow(2, pow) + replies.reduce((acc, reply) => acc + Math.pow(2, verifyPow(reply)), 0); + const totalWork = Math.pow(2, pow) + replies.reduce((acc, reply) => { + const replyPow = reply.id.startsWith('0') ? verifyPow(reply) : 0; + return acc + Math.pow(2, replyPow); + }, 0); const metadataEvent = metadataEvents.find(e => e.pubkey === event.pubkey && e.kind === 0) || null; return { postEvent: event, replies, totalWork, metadataEvent }; })