diff --git a/README.md b/README.md index db5cff0..f30c565 100644 --- a/README.md +++ b/README.md @@ -306,10 +306,8 @@ const build = withServerDevTools(await import(BUILD_PATH), config) ## RemixDevTools props -The `RemixDevTools` component accepts the following props: -- `requireUrlFlag`: Requires rdt=true to be present in the URL search to open the Remix Development Tools. Defaults to `false`. -- `plugins`: Allows you to provide additional tabs (plugins) to the Remix Development Tools. Defaults to `[]`. -- `wsPort`: Allows you to specify over which port the client dev tools will communicate with the server dev tools. Defaults to `8080`. +The `RemixDevTools` component accepts the following props: +- `plugins`: Allows you to provide additional tabs (plugins) to the Remix Development Tools. Defaults to `[]`. ### Defining the config diff --git a/package.json b/package.json index 185c1de..6cfb6c8 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "remix-development-tools", "description": "Remix development tools - a set of tools for developing/debugging Remix.run apps", "author": "Alem Tuzlak", - "version": "3.3.0", + "version": "3.4.0", "license": "MIT", "keywords": [ "remix", diff --git a/src/RemixDevTools/EmbeddedDevTools.tsx b/src/RemixDevTools/EmbeddedDevTools.tsx index 8e67c94..c88eaa8 100644 --- a/src/RemixDevTools/EmbeddedDevTools.tsx +++ b/src/RemixDevTools/EmbeddedDevTools.tsx @@ -8,9 +8,9 @@ import { ContentPanel } from "./layout/ContentPanel.js"; import { MainPanel } from "./layout/MainPanel.js"; import { Tabs } from "./layout/Tabs.js"; import { REMIX_DEV_TOOLS } from "./utils/storage.js"; -import { useLocation } from "@remix-run/react"; import { RDTContextProvider } from "./context/RDTContext.js"; import { useState, useEffect } from "react"; +import { useLocation } from "@remix-run/react"; export interface EmbeddedDevToolsProps extends RemixDevToolsProps { mainPanelClassName?: string; @@ -23,6 +23,8 @@ const Embedded = ({ plugins, mainPanelClassName, className }: EmbeddedDevToolsPr const { settings } = useSettingsContext(); const { position } = settings; const leftSideOriented = position.includes("left"); + const url = useLocation().search; + if (settings.requireUrlFlag && !url.includes(settings.urlFlag)) return null; return (