diff --git a/assets/js/actions/survey.js b/assets/js/actions/survey.js index 02b18f2cb..4c508dd56 100644 --- a/assets/js/actions/survey.js +++ b/assets/js/actions/survey.js @@ -369,7 +369,7 @@ export const deleteLink = (link: Link) => ({ link, }) -export const generatingFile = (file: String) => ({ +export const generatingFile = (file: string) => ({ type: GENERATING_FILE, file }) diff --git a/assets/js/components/respondents/RespondentIndex.jsx b/assets/js/components/respondents/RespondentIndex.jsx index 6f9d15da9..5a1951b90 100644 --- a/assets/js/components/respondents/RespondentIndex.jsx +++ b/assets/js/components/respondents/RespondentIndex.jsx @@ -56,10 +56,11 @@ type Props = { q: string, fields: Array, selectedFields: Array, + respondentsFiles: { files: SurveyFiles }, } type State = { - shownFile: string, + shownFile: ?string, filesFetchTimer: ?IntervalID, } @@ -485,7 +486,7 @@ class RespondentIndex extends Component { const downloadButtonClass = fileExists ? "black-text" : "grey-text" const downloadButtonOnClick = fileExists ? item.onDownload : null - const createdAtLabel = fileExists ? : null + const createdAtLabel = fileExists ? : null const fileCreating = !!fileStatus?.creating const generateButtonClass = fileCreating ? "btn-icon-grey" : "black-text" diff --git a/assets/js/decls/survey.js b/assets/js/decls/survey.js index 00f9a1ace..a343f64b8 100644 --- a/assets/js/decls/survey.js +++ b/assets/js/decls/survey.js @@ -148,7 +148,7 @@ export type Response = { export type Disposition = null | "completed" | "partial" | "ineligible" export type FileStatus = { - created_at: Date?, + created_at: ?Date, creating: boolean, file_type: string, }