mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
fix: initial playground env (#4167)
This commit is contained in:
parent
94bfa025c0
commit
02fea44956
@ -60,7 +60,7 @@ export const AdvancedPlayground: VFC<{
|
||||
const [hasFormBeenSubmitted, setHasFormBeenSubmitted] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (environments?.length === 0) {
|
||||
if (environments?.length === 0 && availableEnvironments.length > 0) {
|
||||
setEnvironments([resolveDefaultEnvironment(availableEnvironments)]);
|
||||
}
|
||||
}, [JSON.stringify(environments), JSON.stringify(availableEnvironments)]);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Box, Button, Divider, useTheme } from '@mui/material';
|
||||
import { Box, Button } from '@mui/material';
|
||||
import { IEnvironment } from 'interfaces/environments';
|
||||
import { FormEvent, VFC } from 'react';
|
||||
import { PlaygroundCodeFieldset } from './PlaygroundCodeFieldset/PlaygroundCodeFieldset';
|
||||
@ -25,8 +25,6 @@ export const PlaygroundForm: VFC<IPlaygroundFormProps> = ({
|
||||
context,
|
||||
setContext,
|
||||
}) => {
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
<Box
|
||||
component="form"
|
||||
|
Loading…
Reference in New Issue
Block a user