Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Issue150 #190

Merged
merged 2 commits into from
Aug 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions src/components/control-panel/control-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,12 @@ export const ControlPanel = () => {

// useQuery function
const setNewLayers = async() => {
// create the authorization header
const requestOptions = {
method: 'GET',
headers: { Authorization: `Bearer ${ getNamespacedEnvParam('REACT_APP_UI_DATA_TOKEN') }` },
params: filters
};
// create the authorization header
const requestOptions = {
method: 'GET',
headers: { Authorization: `Bearer ${ getNamespacedEnvParam('REACT_APP_UI_DATA_TOKEN') }` },
params: filters
};

// retrieve the set of layers for the new cycle
const { isError, data, error } = await axios.get(data_url, requestOptions);
Expand Down Expand Up @@ -274,7 +274,10 @@ export const ControlPanel = () => {
"event_type": eventType,
"storm_name": stormName,
"cycle": runCycle,
"run_date": runDate
"run_date": runDate,
// force useQuery filters to update
// any duplication will be caught in parseAndAddLayers
"force_update": Date.now(),
};

setFilters(newFilters);
Expand All @@ -298,7 +301,10 @@ export const ControlPanel = () => {
"event_type": eventType,
"storm_name": stormName,
"advisory_number": runAdvisory,
"grid_type": runGrid
"grid_type": runGrid,
// force useQuery filters to update
// any duplication will be caught in parseAndAddLayers
"force_update": Date.now(),
};

setFilters(newFilters);
Expand Down