Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix solution previewing #14

Closed

Conversation

malerba118
Copy link
Contributor

PRing against the include-solution branch so can see diff between the two branches better.

This modifies the sql script to init the db because it was a bit broken/out of date (ideally should use migration for this, but probably ok in this case).

Because we're adding a solution column to the quizzes table, any existing rows will have null solutions. For these quizzes with no solution the "Show Solution" button is not rendered.

This also fixes solution previewing and makes solutions readonly. The use of refs here is a bit unconventional and in some cases is causing ui to get out of sync with the app state. The simplest fix was to put in a force rerender while reseting the code to its starting state. Ideally, should just use state instead of refs to store code and won't run into these out-of-sync bugs.

@vercel
Copy link

vercel bot commented Nov 10, 2021

@malerba118 is attempting to deploy a commit to the Sliphq Team on Vercel.

A member of the Team first needs to authorize it.

@malerba118
Copy link
Contributor Author

Closing because #15 included these fixes

@malerba118 malerba118 closed this Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant