Closed clpetersonucf closed 11 months ago
Ready for review.
missing Preview/Play again button
@cayb0rg I can't believe I overlooked the missing Preview Again button, but do you have examples of when the Play Again button should be present and isn't?
Play Again is missing when a widget is set to Guest Mode, because attemptsLeft
is never set the second time (the first time, instance
hasn't loaded yet). In Normal mode, attemptsLeft
gets set after the instance scores are loaded.
Adding instance
as a dependency to the useEffect for attemptsLeft
I think should fix it.
The only other things I see are incredibly minor.
guestAccess
, previewInstId
, and playId
being assigned. The functionality associated with guestAccess
has been condensed into the hook waiting for instance
to be set and available. The query for apiGetWidgetInstancePlayScores
has been updated to trigger when playId
or previewInstId
are set, removing the need for those hooks.single_id
is set.saveState
updates to a hook tracking the new variable. This should hopefully resolve race conditions when the API response returns before the prior creatorState
update is complete.
Bug fixes:
useUpdatedWidget
mutationImprovements:
Scores
component, including splitting logic into childScoreOverview
,ScoreDetails
, andScoreGraphic
components