Skip to content

Commit

Permalink
Merge pull request #82 from flatironinstitute/stanie-data-formatting
Browse files Browse the repository at this point in the history
Reintroduce formatting for stanie data file
  • Loading branch information
WardBrian authored Jun 26, 2024
2 parents 45cd277 + 725d9ad commit b1f84e5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gui/src/app/SPAnalysis/SPAnalysisReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,17 @@ export type SPAnalysisReducerAction = {
export const SPAnalysisReducer: SPAnalysisReducerType = (s: SPAnalysisDataModel, a: SPAnalysisReducerAction) => {
switch (a.type) {
case "loadStanie": {
const dataFileContent = JSON.stringify(a.stanie.data, null, 2);
return {
...s,
stanFileContent: a.stanie.stan,
dataFileContent: JSON.stringify(a.stanie.data),
dataFileContent,
samplingOpts: defaultSamplingOpts,
meta: { ...s.meta, title: a.stanie.meta.title ?? 'Untitled' },
ephemera: {
...s.ephemera,
stanFileContent: a.stanie.stan,
dataFileContent: JSON.stringify(a.stanie.data)
dataFileContent,
}
}
}
Expand Down

0 comments on commit b1f84e5

Please sign in to comment.