generated from RENCI/react-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #197 from RENCI/remove-all-model-runs
#198 - Remove all model runs
- Loading branch information
Showing
2 changed files
with
20 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,21 @@ | ||
import React, { Fragment } from 'react'; | ||
import { Button } from '@mui/joy'; | ||
import {useLayers} from "@context"; | ||
import { useLayers } from "@context"; | ||
|
||
/** | ||
* component that handles the removal of models. | ||
* component that handles the removal of all model runs. | ||
* | ||
* @returns {JSX.Element} | ||
* @constructor | ||
*/ | ||
export const RemoveModels = () => { | ||
// get references to the model data/list | ||
const { | ||
|
||
} = useLayers(); | ||
|
||
/** | ||
* remove the observation selections from state and map | ||
*/ | ||
function removeModels() { | ||
alert("Not ready yet."); | ||
} | ||
// get the method to remove the observation items in state | ||
const { removeAllModelRuns } = useLayers(); | ||
|
||
// render the button | ||
return ( | ||
<Fragment> | ||
<Button color="primary" onClick={() => removeModels()}>Remove selected models</Button> | ||
<Button color="primary" onClick={ () => removeAllModelRuns() }>Remove all selected model runs</Button> | ||
</Fragment> | ||
); | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters