fix: resolve background not loading due deploymend into folder
This commit is contained in:
@@ -13,7 +13,7 @@ export const PANEL_SETTINGS = {
|
|||||||
PANEL_HEIGHT_MAX: 1000,
|
PANEL_HEIGHT_MAX: 1000,
|
||||||
|
|
||||||
// Default values
|
// Default values
|
||||||
DEFAULT_BACKGROUND_IMAGE: "/backgrounds/b1.jpg",
|
DEFAULT_BACKGROUND_IMAGE: "./backgrounds/b1.jpg",
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
// ===== TYPOGRAPHY =====
|
// ===== TYPOGRAPHY =====
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { PANEL_SETTINGS } from "../lib/constants";
|
||||||
import { setCurrentStep } from "../stores/uiStore";
|
import { setCurrentStep } from "../stores/uiStore";
|
||||||
|
|
||||||
export class ImageService {
|
export class ImageService {
|
||||||
@@ -13,7 +14,7 @@ export class ImageService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async loadDefaultBackground(): Promise<string> {
|
async loadDefaultBackground(): Promise<string> {
|
||||||
const defaultBackground = "/backgrounds/b1.jpg";
|
const defaultBackground = PANEL_SETTINGS.DEFAULT_BACKGROUND_IMAGE;
|
||||||
const response = await fetch(defaultBackground);
|
const response = await fetch(defaultBackground);
|
||||||
if (!response.ok) throw new Error("Не удалось загрузить фоновое изображение");
|
if (!response.ok) throw new Error("Не удалось загрузить фоновое изображение");
|
||||||
const blob = await response.blob();
|
const blob = await response.blob();
|
||||||
|
|||||||
Reference in New Issue
Block a user