glass with just background
This commit is contained in:
@@ -82,7 +82,7 @@ export function PatternBackgroundProvider({ children }: { children: ReactNode })
|
||||
|
||||
const themeBase = buildThemeCacheFromRestaurant(restaurant);
|
||||
|
||||
if (!themeBase.isPattern || !themeBase.bgUrl) {
|
||||
if (!themeBase.isPattern) {
|
||||
clearPatternCssVariables();
|
||||
removeCachedThemeBackground();
|
||||
setPatternImageUrl(null);
|
||||
@@ -95,6 +95,19 @@ export function PatternBackgroundProvider({ children }: { children: ReactNode })
|
||||
|
||||
applyPatternCssVariables(menuColor);
|
||||
|
||||
if (!themeBase.bgUrl) {
|
||||
setPatternImageUrl(null);
|
||||
setThemeCache(restaurantSlug, {
|
||||
...themeBase,
|
||||
patternDataUrl: null,
|
||||
});
|
||||
const saved = getThemeCache(restaurantSlug);
|
||||
if (saved) {
|
||||
applyCachedThemeToDom(saved);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const cached = getThemeCache(restaurantSlug);
|
||||
const cacheHit =
|
||||
cached?.isPattern &&
|
||||
|
||||
Reference in New Issue
Block a user