ABSanthosh / react-quizlet-flashcard

A simple quizlet-like flashcard component written with TypeScript
https://www.npmjs.com/package/react-quizlet-flashcard
MIT License
76 stars 7 forks source link

card array display nothing #9

Closed miramgh closed 1 year ago

miramgh commented 1 year ago

Hi, I like your package but for some reason cards array doesn't appear either front or back

MayoudP commented 1 year ago

Hello ! Had struggled a bit too few days ago. For the content to be displayed, be sure that each items in your cards array contain these fields (the docs is ambiguous, no need to use front and back field) :

{
     ...
     frontHTML: ...
     backHTML: ...
}

If you already have it, can you send content of your current array please ?

ABSanthosh commented 1 year ago

@miramgh, Yeah @MayoudP is right. Now all card contents are of the type HTMLElement and fields front and back are removed in v3 in favour of frontHTML and backHTML.

I must have missed this while revising the docs. Will fix it when I get time.

miramgh commented 1 year ago

It works now, thank u so much

ABSanthosh commented 1 year ago

Glad you like this package :)