Skip to content

Commit 260a11b

Browse files
authored
Merge pull request #1465 from hydralauncher/fix/lazy-loading-messing-up-custom-css
fix: lazy loading messing up custom css
2 parents 726a39a + adf3bf3 commit 260a11b

File tree

9 files changed

+36
-52
lines changed

9 files changed

+36
-52
lines changed

.github/workflows/build.yml

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Build
22

3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
37
on: pull_request
48

59
jobs:

.github/workflows/lint.yml

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Lint
22

3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
37
on: pull_request
48

59
jobs:

.github/workflows/release.yml

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Release
22

3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
37
on:
48
push:
59
branches: main

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hydralauncher",
3-
"version": "3.2.1",
3+
"version": "3.2.2",
44
"description": "Hydra",
55
"main": "./out/main/index.js",
66
"author": "Los Broxas",

src/renderer/src/app.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,7 @@ export function App() {
263263

264264
useEffect(() => {
265265
const unsubscribe = window.electron.onCssInjected((cssString) => {
266-
if (cssString) {
267-
injectCustomCss(cssString);
268-
}
266+
injectCustomCss(cssString);
269267
});
270268

271269
return () => unsubscribe();

src/renderer/src/components/backdrop/backdrop.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ export interface BackdropProps {
66
children: React.ReactNode;
77
}
88

9-
export function Backdrop({ isClosing = false, children }: BackdropProps) {
9+
export function Backdrop({
10+
isClosing = false,
11+
children,
12+
}: Readonly<BackdropProps>) {
1013
return (
1114
<div
1215
className={cn("backdrop", {

src/renderer/src/components/button/button.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function Button({
1515
theme = "primary",
1616
className,
1717
...props
18-
}: ButtonProps) {
18+
}: Readonly<ButtonProps>) {
1919
return (
2020
<button
2121
type="button"

src/renderer/src/main.tsx

+16-46
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,17 @@ import { store } from "./store";
1818

1919
import resources from "@locales";
2020

21-
import { SuspenseWrapper } from "./components";
2221
import { logger } from "./logger";
2322
import { addCookieInterceptor } from "./cookies";
24-
25-
const Home = React.lazy(() => import("./pages/home/home"));
26-
const GameDetails = React.lazy(
27-
() => import("./pages/game-details/game-details")
28-
);
29-
const Downloads = React.lazy(() => import("./pages/downloads/downloads"));
30-
const Settings = React.lazy(() => import("./pages/settings/settings"));
31-
const Catalogue = React.lazy(() => import("./pages/catalogue/catalogue"));
32-
const Profile = React.lazy(() => import("./pages/profile/profile"));
33-
const Achievements = React.lazy(
34-
() => import("./pages/achievements/achievements")
35-
);
36-
const ThemeEditor = React.lazy(
37-
() => import("./pages/theme-editor/theme-editor")
38-
);
39-
4023
import * as Sentry from "@sentry/react";
24+
import Catalogue from "./pages/catalogue/catalogue";
25+
import Home from "./pages/home/home";
26+
import Downloads from "./pages/downloads/downloads";
27+
import GameDetails from "./pages/game-details/game-details";
28+
import Settings from "./pages/settings/settings";
29+
import Profile from "./pages/profile/profile";
30+
import Achievements from "./pages/achievements/achievements";
31+
import ThemeEditor from "./pages/theme-editor/theme-editor";
4132

4233
Sentry.init({
4334
dsn: import.meta.env.RENDERER_VITE_SENTRY_DSN,
@@ -82,37 +73,16 @@ ReactDOM.createRoot(document.getElementById("root")!).render(
8273
<HashRouter>
8374
<Routes>
8475
<Route element={<App />}>
85-
<Route path="/" element={<SuspenseWrapper Component={Home} />} />
86-
<Route
87-
path="/catalogue"
88-
element={<SuspenseWrapper Component={Catalogue} />}
89-
/>
90-
<Route
91-
path="/downloads"
92-
element={<SuspenseWrapper Component={Downloads} />}
93-
/>
94-
<Route
95-
path="/game/:shop/:objectId"
96-
element={<SuspenseWrapper Component={GameDetails} />}
97-
/>
98-
<Route
99-
path="/settings"
100-
element={<SuspenseWrapper Component={Settings} />}
101-
/>
102-
<Route
103-
path="/profile/:userId"
104-
element={<SuspenseWrapper Component={Profile} />}
105-
/>
106-
<Route
107-
path="/achievements"
108-
element={<SuspenseWrapper Component={Achievements} />}
109-
/>
76+
<Route path="/" element={<Home />} />
77+
<Route path="/catalogue" element={<Catalogue />} />
78+
<Route path="/downloads" element={<Downloads />} />
79+
<Route path="/game/:shop/:objectId" element={<GameDetails />} />
80+
<Route path="/settings" element={<Settings />} />
81+
<Route path="/profile/:userId" element={<Profile />} />
82+
<Route path="/achievements" element={<Achievements />} />
11083
</Route>
11184

112-
<Route
113-
path="/theme-editor"
114-
element={<SuspenseWrapper Component={ThemeEditor} />}
115-
/>
85+
<Route path="/theme-editor" element={<ThemeEditor />} />
11686
</Routes>
11787
</HashRouter>
11888
</Provider>

src/renderer/src/pages/settings/aparence/settings-appearance.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ export function SettingsAppearance({
110110
onClose={() => {
111111
setIsImportThemeModalVisible(false);
112112
clearTheme();
113+
setHasShownModal(false);
113114
}}
114115
onThemeImported={onThemeImported}
115116
themeName={importTheme.theme}

0 commit comments

Comments
 (0)