Skip to content

Commit

Permalink
[frontend/backend] Clean
Browse files Browse the repository at this point in the history
  • Loading branch information
savacano28 committed Jan 13, 2025
1 parent b3fa255 commit 0c650b7
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ const StixCoreObjectSimulationResult = ({ id, type }) => {
const { enabled, configured } = useAI();
const isSimulatedEmailsAvailable = enabled && configured && isEnterpriseEdition;
const [simulationType, setSimulationType] = useState('technical');
const [platforms, setPlatforms] = useState(['Windows']);
const [platforms, setPlatforms] = useState([{ label: 'Windows', value: 'Windows' }]);
const [architecture, setArchitecture] = useState('x86_64');
const [selection, setSelection] = useState('random');
const [interval, setInterval] = useState(2);
Expand Down Expand Up @@ -242,6 +242,7 @@ const StixCoreObjectSimulationResult = ({ id, type }) => {
const handleGenerate = () => {
setIsSubmitting(true);
setOpen(false);
const selectedPlatforms = platforms.map((option) => option.value);
switch (type) {
case 'container':
commitMutationGenerateContainer({
Expand All @@ -251,7 +252,7 @@ const StixCoreObjectSimulationResult = ({ id, type }) => {
interval,
selection,
simulationType,
platforms,
platforms: selectedPlatforms,
architecture,
},
filters,
Expand All @@ -276,7 +277,7 @@ const StixCoreObjectSimulationResult = ({ id, type }) => {
interval,
selection,
simulationType,
platforms,
platforms: selectedPlatforms,
architecture,
},
filters,
Expand All @@ -301,7 +302,7 @@ const StixCoreObjectSimulationResult = ({ id, type }) => {
interval,
selection,
simulationType,
platforms,
platforms: selectedPlatforms,
architecture,
},
filters,
Expand Down Expand Up @@ -405,7 +406,7 @@ const StixCoreObjectSimulationResult = ({ id, type }) => {
}}
multiple
options={platformOptions}
onChange={(_event, newValue) => setPlatforms(newValue.map((option) => option.value || option))}
onChange={(_event, newValue) => setPlatforms(newValue)}
renderOption={(props, option) => (
<li {...props}>
<div className={classes.text}>{option.label ?? ''}</div>
Expand Down

0 comments on commit 0c650b7

Please sign in to comment.