From 078f94cbc0dfc7d29b3585bb029bb70f61402529 Mon Sep 17 00:00:00 2001 From: LJ <23249107+LJNeon@users.noreply.github.com> Date: Thu, 15 Feb 2024 05:55:36 -0700 Subject: [PATCH] BUGFIX: Fix script editor documentation button using wrong URL (#1099) * Fix script editor documentation button * Fix lint and import url --- src/ScriptEditor/ui/Toolbar.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ScriptEditor/ui/Toolbar.tsx b/src/ScriptEditor/ui/Toolbar.tsx index 2e7270426..e2739e35e 100644 --- a/src/ScriptEditor/ui/Toolbar.tsx +++ b/src/ScriptEditor/ui/Toolbar.tsx @@ -14,6 +14,7 @@ import SettingsIcon from "@mui/icons-material/Settings"; import { makeTheme, sanitizeTheme } from "./themes"; +import { CONSTANTS } from "../../Constants"; import { Modal } from "../../ui/React/Modal"; import { Page } from "../../ui/Router"; import { Router } from "../../ui/GameRoot"; @@ -22,6 +23,10 @@ import { Settings } from "../../Settings/Settings"; import { OptionsModal, OptionsModalProps } from "./OptionsModal"; import { useScriptEditorContext } from "./ScriptEditorContext"; +const docUrl = + "https://github.com/bitburner-official/bitburner-src/blob/" + + (CONSTANTS.isDevBranch ? "dev" : "stable") + + "/markdown/bitburner.ns.md"; type IStandaloneCodeEditor = monaco.editor.IStandaloneCodeEditor; interface IProps { @@ -69,10 +74,7 @@ export function Toolbar({ editor, onSave }: IProps) { Terminal (Ctrl/Cmd + b) - + Documentation