hensei-web/components
Justin Edmund f6d0a0b795 Ensure content gets reset when edits are committed
Here, we do some tactical bandaid fixes to ensure that when the user saves data to the server, the editor will show the freshest data in both editable and read-only mode.

In the Editor, its as easy as calling the setContent command in a useEffect hook when the content changes.

In the party, we are saving party in a state and passing it down to the components via props. This is because the party prop we get from pages is only from the first time the server loaded data, so any edits are not reflected. The app state should have the latest updates, but due to reasons I don't completely understand, it is showing the old state first and then the one we want, causing the Editor to get stuck on old data.

By storing the party in a state, we can populate the state from the server when the component mounts, then update it whenever the user saves data since all party data is saved in that component.
2023-07-06 02:45:37 -07:00
..
about Rich text editor and support for tagging objects (#340) 2023-07-05 21:19:34 -07:00
auth Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
character Rich text editor and support for tagging objects (#340) 2023-07-05 21:19:34 -07:00
common Ensure content gets reset when edits are committed 2023-07-06 02:45:37 -07:00
dialogs Deploy quality fixes (#328) 2023-06-21 03:44:43 -07:00
ElementToggle Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
ErrorSection Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
extra Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
filters Rich text editor and support for tagging objects (#340) 2023-07-05 21:19:34 -07:00
GridRep Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
GridRepCollection Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
head Deploy organization and bug fixes (#299) 2023-04-12 06:37:41 -07:00
Header Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
HovercardHeader Rich text editor and support for tagging objects (#340) 2023-07-05 21:19:34 -07:00
job Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
LanguageSwitch Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
Layout Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
mastery Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
MentionList Rich text editor and support for tagging objects (#340) 2023-07-05 21:19:34 -07:00
party Ensure content gets reset when edits are committed 2023-07-06 02:45:37 -07:00
raids (Hotfix) (Temporary) nuclear option for raid population (#339) 2023-07-04 02:20:48 -07:00
reps Fix background-color on CharacterRep 2023-07-05 22:35:54 -07:00
search Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
summon Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
toasts Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
uncap Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
weapon Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00