Menu

Our homepage demo has four numbers for one score, and an ordinal suffix with three branches that can never run
📰

Our homepage demo has four numbers for one score, and an ordinal suffix with three branches that can never run

DEV Community: frontend·Daniel Pertu·13 days ago
#28FNuJJK
#devtofrontend#devto#dev#percentile#score
Long article (1400 words) — no AI summary yet.
Reading 0:00
15s threshold

CogniPrep's landing page has four interactive demos instead of a video. One of them walks you through a feedback report: pick a practice session, watch a progress bar, read the report. It is 616 lines of client component with hand-written mock data, and no part of it talks to the real product.

That is a reasonable thing to build. A demo backed by live code means signing in, and the whole point is to show somebody what they get before they do. But a mock has no type checking against reality and nothing that reads it twice, and this one has been quietly drifting.

The data: two objects that look like one

Three fictional sessions:

const mockSessions = [ { gameName : 'Balloon' , score : 72 , percentile : 80 , category : 'above-average' , date : 'Dec 15, 2024' } , { gameName : 'Arrows' , score : 85 , percentile : 95 , category : 'excellent' , date : 'Dec 14, 2024' } , { gameName : 'Memory' , score : 52 , percentile : 61 , category : 'average' , date : 'Dec 13, 2024' } , ] ;

Enter fullscreen mode

Exit…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.