Skip to content

Commit

Permalink
fix: Have JSX.Element instead of string for info (to make links easie…
Browse files Browse the repository at this point in the history
…r to build)
  • Loading branch information
itssimple committed May 12, 2024
1 parent c339335 commit e2b61cc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"build": "docusaurus build --no-minify",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
Expand Down
12 changes: 7 additions & 5 deletions src/components/games.information.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import React from "react";

export type GameInfoItem = {
id: number;
name: string;
image: string;
avatarUrl: string;
appWeb?: AppWeb[];
os?: OperatingSystem[];
info?: string;
info?: JSX.Element;
}

export enum AppWeb {
Expand Down Expand Up @@ -33,7 +35,7 @@ const GamesInformation : GameInfoItem[] = [
avatarUrl: "https://media.forgecdn.net/avatars/652/748/638054969446166748.png",
appWeb: [AppWeb.Standalone, AppWeb.OverwolfApp, AppWeb.Web],
os: [OperatingSystem.Windows, OperatingSystem.Linux, OperatingSystem.Mac],
"info": "Does not behave well with Microsoft Gamepass"
"info": <>Does not behave well with Microsoft Gamepass</>
},
{
"id": 65,
Expand Down Expand Up @@ -217,7 +219,7 @@ const GamesInformation : GameInfoItem[] = [
"avatarUrl": "https://media.forgecdn.net/avatars/858/778/638264250839731334.png",
os: [OperatingSystem.Windows, OperatingSystem.PlayStation, OperatingSystem.Xbox],
appWeb: [AppWeb.InGame],
info: "Modding is done from in-game only."
info: <>Modding is done from in-game only.</>
},
{
"id": 83387,
Expand Down Expand Up @@ -370,7 +372,7 @@ const GamesInformation : GameInfoItem[] = [
"avatarUrl": "https://media.forgecdn.net/avatars/936/141/638413534976321166.jpg",
os: [OperatingSystem.Windows],
appWeb: [AppWeb.Standalone, AppWeb.OverwolfApp, AppWeb.Web],
info: "Does not behave well with Microsoft Gamepass"
info: <>Does not behave well with Microsoft Gamepass</>
},
{
"id": 85440,
Expand Down Expand Up @@ -545,7 +547,7 @@ const GamesInformation : GameInfoItem[] = [
"avatarUrl": "https://media.forgecdn.net/avatars/652/747/638054969273937292.png",
appWeb: [AppWeb.OverwolfApp],
os: [OperatingSystem.Windows],
info: "You should probably use <a href=\"https://github.com/KSP-CKAN/CKAN/wiki/User-guide\" target\"_blank\">CKAN</a> instead"
info: <>You should probably use <a href={"https://github.com/KSP-CKAN/CKAN/wiki/User-guide"} target={"_blank"}>CKAN</a> instead</>
},
{
"id": 496,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/games.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function GameInformation(game: GameInfoItem) {
<td>{game.name}</td>
<td>{game.appWeb?.map(i => i.toString()).sort().join(", ") ?? AppWeb.Unknown}</td>
<td>{game.os?.map(i => i.toString()).sort().join(", ") ?? OperatingSystem.Unknown}</td>
<td dangerouslySetInnerHTML={{ __html: game.info }}></td>
<td>{game.info}</td>
</tr>
</>
);
Expand Down

0 comments on commit e2b61cc

Please sign in to comment.