diff --git a/packages/twenty-docs/src/pages/rest-api.tsx b/packages/twenty-docs/src/pages/rest-api.tsx index 90c4e53d4..9d0873b07 100644 --- a/packages/twenty-docs/src/pages/rest-api.tsx +++ b/packages/twenty-docs/src/pages/rest-api.tsx @@ -3,7 +3,7 @@ import BrowserOnly from "@docusaurus/BrowserOnly"; import React, { useEffect, useState } from "react"; import { API } from '@stoplight/elements'; import spotlightTheme from '!css-loader!@stoplight/elements/styles.min.css'; -import './rest-api.css' +import restApiCss from '!css-loader!./rest-api.css'; import { parseJson } from "nx/src/utils/json"; import { TbLoader2 } from "react-icons/tb"; @@ -28,6 +28,14 @@ const TokenForm = ({onSubmit, isTokenValid, token, isLoading}: TokenFormProps)=> return () => styleElement.remove(); }, []); + useEffect(() => { + const styleElement = document.createElement('style'); + styleElement.innerHTML = restApiCss.toString(); + document.head.append(styleElement); + + return () => styleElement.remove(); + }, []); + return !isTokenValid && (