Fix incorrect Scalar CSS import (#10763)

CSS was loaded in a global context (full screen which might be re-used
for other use cases in the future) instead of a local context.

\+ small update on .env.example
This commit is contained in:
Félix Malfait
2025-03-10 21:10:40 +01:00
committed by GitHub
parent dc66d2498e
commit e5a7aab733
3 changed files with 7 additions and 6 deletions

View File

@ -1,6 +1,5 @@
REACT_APP_SERVER_BASE_URL=http://localhost:3000
GENERATE_SOURCEMAP=false
TRANSLATION_IO_API_KEY=xxx
VITE_BUILD_SOURCEMAP=false
# ———————— Optional ————————

View File

@ -16,9 +16,12 @@ const StyledContainer = styled.div`
`;
const ApiReferenceReact = lazy(() =>
import('@scalar/api-reference-react').then((module) => ({
default: module.ApiReferenceReact,
})),
import('@scalar/api-reference-react').then((module) => {
import('@scalar/api-reference-react/style.css');
return {
default: module.ApiReferenceReact,
};
}),
);
type RestPlaygroundProps = {

View File

@ -5,7 +5,6 @@ import {
} from '@/ui/navigation/bread-crumb/components/Breadcrumb';
import styled from '@emotion/styled';
import { useLingui } from '@lingui/react/macro';
import '@scalar/api-reference-react/style.css';
import { IconButton, IconX, useIsMobile } from 'twenty-ui';
type FullScreenContainerProps = {