/**
* @flow
* @file Footer component
*/
import React from 'react';
import { FormattedMessage } from 'react-intl';
import PrimaryButton from '../../components/primary-button/PrimaryButton';
import Button from '../../components/button/Button';
import messages from '../common/messages';
import { ERROR_CODE_UPLOAD_FILE_LIMIT } from '../../constants';
import './Footer.scss';
type Props = {
errorCode?: string,
fileLimit: number,
hasFiles: boolean,
isDone: boolean,
isLoading: boolean,
onCancel: Function,
onClose?: Function,
onUpload: Function,
};
const Footer = ({ isLoading, hasFiles, errorCode, onCancel, onClose, onUpload, fileLimit, isDone }: Props) => {
let message;
switch (errorCode) {
case ERROR_CODE_UPLOAD_FILE_LIMIT:
message =