Commit f73fb761 authored by Chunchi Che's avatar Chunchi Che

fix deploy

parent 9f74038d
Pipeline #21453 passed with stages
in 15 minutes and 44 seconds
...@@ -7,6 +7,11 @@ import { useConfig } from "@/config"; ...@@ -7,6 +7,11 @@ import { useConfig } from "@/config";
const NeosConfig = useConfig(); const NeosConfig = useConfig();
const ASSETS_BASE =
import.meta.env.BASE_URL == "/"
? NeosConfig.assetsPath
: import.meta.env.BASE_URL + NeosConfig.assetsPath;
export const Card: React.FC<{ export const Card: React.FC<{
code: number; code: number;
row: number; row: number;
...@@ -52,7 +57,7 @@ export const Card: React.FC<{ ...@@ -52,7 +57,7 @@ export const Card: React.FC<{
"--trans-time": `${transTime}s`, "--trans-time": `${transTime}s`,
"--highlight-on": highlight ? 1 : 0, "--highlight-on": highlight ? 1 : 0,
"--card-img": facedown "--card-img": facedown
? `url(${NeosConfig.assetsPath + "/card_back.jpg"})` ? `url(${ASSETS_BASE + "/card_back.jpg"})`
: `url(${NeosConfig.cardImgUrl + "/" + code + ".jpg"})`, : `url(${NeosConfig.cardImgUrl + "/" + code + ".jpg"})`,
...style, ...style,
} as any } as any
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment