glass with just background

This commit is contained in:
hamid zarghami
2026-06-21 15:46:04 +03:30
parent ac049ef067
commit 3bb6ffac4e
4 changed files with 26 additions and 7 deletions
@@ -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 &&