@articles-media/articles-dev-box 1.0.39 → 1.0.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -438,7 +438,7 @@ function Ad(props) {
438
438
  className: "icon d-none",
439
439
  children: /* @__PURE__ */ jsx("i", { className: "fas fa-mug-hot" })
440
440
  }),
441
- /* @__PURE__ */ jsx("img", {
441
+ (ad?.background?.key || previewData?.background?.key) && /* @__PURE__ */ jsx("img", {
442
442
  className: "photo",
443
443
  src: previewData?.background?.key ? `${process.env.NEXT_PUBLIC_CDN}${previewData.background?.key}` : `${process.env.NEXT_PUBLIC_CDN}${ad?.background?.key}`,
444
444
  alt: ""
package/dist/Ad.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as Ad_default } from "./Ad-DluWOnz3.js";
1
+ import { t as Ad_default } from "./Ad-bic8syS1.js";
2
2
  export { Ad_default as default };
@@ -69,10 +69,13 @@ function CreditsModal({ show, setShow, useStore, owner, repo, developers, publis
69
69
  children: [/* @__PURE__ */ jsx("i", { className: "fad fa-browser me-2" }), /* @__PURE__ */ jsx("span", { children: "View Website" })]
70
70
  })
71
71
  })] }),
72
- owner && repo && /* @__PURE__ */ jsxs("div", {
72
+ (owner && repo || process.env.NEXT_PUBLIC_OWNER && process.env.NEXT_PUBLIC_REPO) && /* @__PURE__ */ jsxs("div", {
73
73
  className: "mb-3",
74
- children: [/* @__PURE__ */ jsx("div", { children: "Attributions:" }), /* @__PURE__ */ jsx("a", {
75
- href: `https://github.com/${owner}/${repo}/blob/main/README.md#attributions`,
74
+ children: [/* @__PURE__ */ jsx("h6", {
75
+ className: "mb-2",
76
+ children: "Attributions:"
77
+ }), /* @__PURE__ */ jsx("a", {
78
+ href: `https://github.com/${owner || process.env.NEXT_PUBLIC_OWNER}/${repo || process.env.NEXT_PUBLIC_REPO}/blob/main/README.md#attributions`,
76
79
  target: "_blank",
77
80
  rel: "noopener noreferrer",
78
81
  children: /* @__PURE__ */ jsxs(ArticlesButton, { children: [/* @__PURE__ */ jsx("i", { className: "fab fa-github" }), "View on GitHub"] })
@@ -2,7 +2,7 @@ import { t as ArticlesButton } from "./Button-DvEZjsVV.js";
2
2
  import useFullscreen from "./useFullscreen.js";
3
3
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
4
  //#region src/components/Games/GameMenuPrimaryButtonGroup.jsx
5
- function PrimaryButtonGroup({ useStore, type }) {
5
+ function PrimaryButtonGroup({ useStore, type, owner, repo }) {
6
6
  if (!useStore) return null;
7
7
  const { isFullscreen, requestFullscreen, exitFullscreen } = useFullscreen();
8
8
  const setShowSettingsModal = useStore((state) => state.setShowSettingsModal);
@@ -41,7 +41,7 @@ function PrimaryButtonGroup({ useStore, type }) {
41
41
  children: [/* @__PURE__ */ jsx("i", { className: "fad fa-info-square" }), "Info"]
42
42
  }),
43
43
  /* @__PURE__ */ jsx("a", {
44
- href: "https://github.com/Articles-Joey/catching-game",
44
+ href: `https://github.com/${owner || process.env.NEXT_PUBLIC_OWNER}/${repo || process.env.NEXT_PUBLIC_REPO}`,
45
45
  target: "_blank",
46
46
  rel: "noopener noreferrer",
47
47
  className: "w-50",
@@ -232,7 +232,7 @@ function OtherTab({ useStore, config }) {
232
232
  var package_default = {
233
233
  name: "@articles-media/articles-dev-box",
234
234
  description: "Shared code, functions, and components for different Articles Media projects.",
235
- version: "1.0.39",
235
+ version: "1.0.41",
236
236
  type: "module",
237
237
  imports: { "#root/src/*": "./src/*" },
238
238
  main: "./dist/index.js",
@@ -1,2 +1,2 @@
1
- import { t as SettingsModal } from "./SettingsModal-PGPKzHah.js";
1
+ import { t as SettingsModal } from "./SettingsModal-DDTYTP4z.js";
2
2
  export { SettingsModal as default };
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import SignInButton from "./SignInButton.js";
3
3
  import useUserDetails from "./useUserDetails.js";
4
4
  import useUserToken from "./useUserToken.js";
5
5
  import { t as ViewUserModal } from "./ViewUserModal-Dgo1C4sR.js";
6
- import { t as Ad_default } from "./Ad-DluWOnz3.js";
6
+ import { t as Ad_default } from "./Ad-bic8syS1.js";
7
7
  import useUserFriends from "./useUserFriends.js";
8
8
  import FriendsList from "./FriendsList.js";
9
9
  import { t as SessionButton } from "./SessionButton-D3cupnzD.js";
@@ -15,7 +15,7 @@ import NicknameInput from "./NicknameInput.js";
15
15
  import { t as GameScoreboard } from "./GameScoreboard-CYuTBE_E.js";
16
16
  import GlobalHead from "./GlobalHead.js";
17
17
  import GlobalBody_default from "./GlobalBody.js";
18
- import { t as SettingsModal } from "./SettingsModal-PGPKzHah.js";
18
+ import { t as SettingsModal } from "./SettingsModal-DDTYTP4z.js";
19
19
  import CreditsModal from "./CreditsModal.js";
20
20
  import DarkModeHandler from "./DarkModeHandler.js";
21
21
  import ToontownModeHandler from "./ToontownModeHandler.js";
@@ -1,6 +1,9 @@
1
1
  import useSWR from "swr";
2
2
  //#region src/hooks/User/useUserToken.js
3
- var fetcher = (url) => fetch(url).then((res) => res.json());
3
+ var fetcher = (url) => fetch(url).then((res) => {
4
+ if (res.status !== 200) return false;
5
+ return res.json();
6
+ });
4
7
  var useUserToken = (port) => {
5
8
  const { data, error, isLoading, mutate } = useSWR(process.env.NODE_ENV === "development" ? `http://localhost:${port}/api/token` : "/api/token", fetcher, {
6
9
  revalidateOnFocus: false,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@articles-media/articles-dev-box",
3
3
  "description": "Shared code, functions, and components for different Articles Media projects.",
4
- "version": "1.0.39",
4
+ "version": "1.0.41",
5
5
  "type": "module",
6
6
  "imports": {
7
7
  "#root/src/*": "./src/*"