Skip to content

Commit e2b61cc

Browse files
committed
fix: Have JSX.Element instead of string for info (to make links easier to build)
1 parent c339335 commit e2b61cc

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"scripts": {
66
"docusaurus": "docusaurus",
77
"start": "docusaurus start",
8-
"build": "docusaurus build",
8+
"build": "docusaurus build --no-minify",
99
"swizzle": "docusaurus swizzle",
1010
"deploy": "docusaurus deploy",
1111
"clear": "docusaurus clear",

src/components/games.information.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
import React from "react";
2+
13
export type GameInfoItem = {
24
id: number;
35
name: string;
46
image: string;
57
avatarUrl: string;
68
appWeb?: AppWeb[];
79
os?: OperatingSystem[];
8-
info?: string;
10+
info?: JSX.Element;
911
}
1012

1113
export enum AppWeb {
@@ -33,7 +35,7 @@ const GamesInformation : GameInfoItem[] = [
3335
avatarUrl: "https://media.forgecdn.net/avatars/652/748/638054969446166748.png",
3436
appWeb: [AppWeb.Standalone, AppWeb.OverwolfApp, AppWeb.Web],
3537
os: [OperatingSystem.Windows, OperatingSystem.Linux, OperatingSystem.Mac],
36-
"info": "Does not behave well with Microsoft Gamepass"
38+
"info": <>Does not behave well with Microsoft Gamepass</>
3739
},
3840
{
3941
"id": 65,
@@ -217,7 +219,7 @@ const GamesInformation : GameInfoItem[] = [
217219
"avatarUrl": "https://media.forgecdn.net/avatars/858/778/638264250839731334.png",
218220
os: [OperatingSystem.Windows, OperatingSystem.PlayStation, OperatingSystem.Xbox],
219221
appWeb: [AppWeb.InGame],
220-
info: "Modding is done from in-game only."
222+
info: <>Modding is done from in-game only.</>
221223
},
222224
{
223225
"id": 83387,
@@ -370,7 +372,7 @@ const GamesInformation : GameInfoItem[] = [
370372
"avatarUrl": "https://media.forgecdn.net/avatars/936/141/638413534976321166.jpg",
371373
os: [OperatingSystem.Windows],
372374
appWeb: [AppWeb.Standalone, AppWeb.OverwolfApp, AppWeb.Web],
373-
info: "Does not behave well with Microsoft Gamepass"
375+
info: <>Does not behave well with Microsoft Gamepass</>
374376
},
375377
{
376378
"id": 85440,
@@ -545,7 +547,7 @@ const GamesInformation : GameInfoItem[] = [
545547
"avatarUrl": "https://media.forgecdn.net/avatars/652/747/638054969273937292.png",
546548
appWeb: [AppWeb.OverwolfApp],
547549
os: [OperatingSystem.Windows],
548-
info: "You should probably use <a href=\"https://github.com/KSP-CKAN/CKAN/wiki/User-guide\" target\"_blank\">CKAN</a> instead"
550+
info: <>You should probably use <a href={"https://github.com/KSP-CKAN/CKAN/wiki/User-guide"} target={"_blank"}>CKAN</a> instead</>
549551
},
550552
{
551553
"id": 496,

src/pages/games.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function GameInformation(game: GameInfoItem) {
1313
<td>{game.name}</td>
1414
<td>{game.appWeb?.map(i => i.toString()).sort().join(", ") ?? AppWeb.Unknown}</td>
1515
<td>{game.os?.map(i => i.toString()).sort().join(", ") ?? OperatingSystem.Unknown}</td>
16-
<td dangerouslySetInnerHTML={{ __html: game.info }}></td>
16+
<td>{game.info}</td>
1717
</tr>
1818
</>
1919
);

0 commit comments

Comments
 (0)