Skip to content
This repository was archived by the owner on May 25, 2025. It is now read-only.

Commit d50bf30

Browse files
committed
refactor(slides): Replace hardcoded image paths with imports for better maintainability
1 parent 4bfa4d8 commit d50bf30

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

src/installers/stub-win64-installer/src-tauri/tauri.conf.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"windows": [
1414
{
1515
"title": "Floorp Installer",
16-
"width": 800,
17-
"height": 600,
16+
"width": 650,
17+
"height": 450,
1818
"decorations": false,
1919
"resizable": false,
2020
"closable": true,

src/installers/stub-win64-installer/src/app/data/slides.tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ import type React from "react";
22
import { useMemo } from "react";
33
import { useTranslation } from "react-i18next";
44

5+
import slide1 from "../../assets/slide1.svg?inline";
6+
import slide2 from "../../assets/slide2.svg?inline";
7+
import slide3 from "../../assets/slide3.svg?inline";
8+
import slide4 from "../../assets/slide4.svg?inline";
9+
import slide5 from "../../assets/slide5.svg?inline";
10+
511
export interface Slide {
612
id: number;
713
title: string;
@@ -18,31 +24,31 @@ export const useSlides = (): Slide[] => {
1824
id: 1,
1925
title: t("slides.slide1.title"),
2026
description: t("slides.slide1.description"),
21-
icon: <img src="/src/assets/slide1.svg" />,
27+
icon: <img src={slide1} />,
2228
},
2329
{
2430
id: 2,
2531
title: t("slides.slide2.title"),
2632
description: t("slides.slide2.description"),
27-
icon: <img src="/src/assets/slide2.svg" />,
33+
icon: <img src={slide2} />,
2834
},
2935
{
3036
id: 3,
3137
title: t("slides.slide3.title"),
3238
description: t("slides.slide3.description"),
33-
icon: <img src="/src/assets/slide3.svg" />,
39+
icon: <img src={slide3} />,
3440
},
3541
{
3642
id: 4,
3743
title: t("slides.slide4.title"),
3844
description: t("slides.slide4.description"),
39-
icon: <img src="/src/assets/slide4.svg" />,
45+
icon: <img src={slide4} />,
4046
},
4147
{
4248
id: 5,
4349
title: t("slides.slide5.title"),
4450
description: t("slides.slide5.description"),
45-
icon: <img src="/src/assets/slide5.svg" />,
51+
icon: <img src={slide5} />,
4652
},
4753
],
4854
[t],
-36.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)