Skip to content

Commit

Permalink
fix build issue
Browse files Browse the repository at this point in the history
  • Loading branch information
xTVaser committed Nov 14, 2024
1 parent d7423a1 commit 9f72352
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { Button, toggle } from "@nextui-org/react";
import { Button } from "@nextui-org/react";

const categoryColorMapping = {
perfect: {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/compat/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import Fuse from "fuse.js";
import { DateTime } from "luxon";
import { GoogleAd } from "../../components/GoogleAd";
import { useMediaQuery } from "../../utils/mediaQuery";
import { CompatibilityButton } from "./CompatibilityButton";
import { CompatibilityButton } from "../../components/CompatibilityButton";

function getTableData(compatData) {
const compatRows = [];
Expand Down
5 changes: 4 additions & 1 deletion src/pages/downloads/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { getLatestRelease } from "../../components/ReleaseDownloadButton";
import Head from "@docusaurus/Head";
import ReactMarkdown from "react-markdown";
import { GoogleAd } from "../../components/GoogleAd";
import useIsBrowser from "@docusaurus/useIsBrowser";

const releaseTableColumns = [
{
Expand Down Expand Up @@ -62,7 +63,9 @@ const renderReleaseCell = (release, columnKey, isNightly, isSelected) => {
let baseApiUrl = "https://api.pcsx2.net/v1";

export default function Downloads() {
if (window.location.hostname === "localhost") {
const isBrowser = useIsBrowser();

if (isBrowser && window.location.hostname === "localhost") {
baseApiUrl = "https://localhost:8001/v1";
}

Expand Down
5 changes: 4 additions & 1 deletion src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ import {
previousProgressReport,
} from "../data/latestBlogs";

import useIsBrowser from "@docusaurus/useIsBrowser";

let baseApiUrl = "https://api.pcsx2.net/v1";

export default function Home() {
Expand All @@ -51,8 +53,9 @@ export default function Home() {
const [latestNightlyRelease, setLatestNightlyRelease] = useState({});
const [apiErrorMsg, setApiErrorMsg] = useState(undefined);
const [homeVideoPath, setHomeVideoPath] = useState("/videos/splash.webm");
const isBrowser = useIsBrowser();

if (window.location.hostname === "localhost") {
if (isBrowser && window.location.hostname === "localhost") {
baseApiUrl = "https://localhost:8001/v1";
}

Expand Down

0 comments on commit 9f72352

Please sign in to comment.