0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-01 10:52:46 +00:00

No need to stringify Theme Bundle object

This commit is contained in:
Trevor Buckner
2024-07-27 02:00:38 -04:00
parent d2afa7adea
commit 113f9b3fe3
2 changed files with 3 additions and 3 deletions

View File

@@ -36,7 +36,7 @@ const printCurrentBrew = ()=>{
const fetchThemeBundle = (obj, renderer, theme)=>{
fetch(`${window.location.protocol}//${window.location.host}/theme/${renderer}/${theme}`).then((response)=>response.json()).then((themeBundle)=>{
themeBundle.joinedStyles = themeBundle.styles.map((style)=>`<style>${style}</style>`).join('\n\n'); //DOMPurify.sanitize(joinedStyles, purifyConfig);
obj.setState((prevState)=>({ // MOVE TO MOUNT STEP OF SHARE / NEW / EDIT
obj.setState((prevState)=>({
...prevState,
themeBundle : themeBundle
}));