uppercase constants

This commit is contained in:
Travis Eden 2018-04-02 13:46:24 -04:00 committed by Sean Yesmunt
parent c0e902df1e
commit 9366d09f83

View file

@ -1,6 +1,6 @@
// @flow // @flow
import * as modals from 'constants/modal_types'; import * as MODALS from 'constants/modal_types';
import * as statuses from 'constants/thumbnail_upload_statuses'; import * as STATUSES from 'constants/thumbnail_upload_statuses';
import React from 'react'; import React from 'react';
import { FormField } from 'component/common/form'; import { FormField } from 'component/common/form';
import FileSelector from 'component/common/file-selector'; import FileSelector from 'component/common/file-selector';
@ -25,17 +25,17 @@ class SelectThumbnail extends React.PureComponent<Props> {
return ( return (
<div> <div>
{(status === statuses.READY || status === statuses.IN_PROGRESS) && ( {(status === STATUSES.READY || status === STATUSES.IN_PROGRESS) && (
<div> <div>
<span className="form-field__label">{__('Thumbnail')}</span> <span className="form-field__label">{__('Thumbnail')}</span>
<FileSelector <FileSelector
fileLabel={__('Choose Thumbnail')} fileLabel={__('Choose Thumbnail')}
onFileChosen={path => openModal(modals.CONFIRM_THUMBNAIL_UPLOAD, { path })} onFileChosen={path => openModal(MODALS.CONFIRM_THUMBNAIL_UPLOAD, { path })}
/> />
</div> </div>
)} )}
{(status === statuses.API_DOWN || status === statuses.MANUAL) && ( {(status === STATUSES.API_DOWN || status === STATUSES.MANUAL) && (
<FormField <FormField
stretch stretch
type="text" type="text"
@ -48,31 +48,31 @@ class SelectThumbnail extends React.PureComponent<Props> {
/> />
)} )}
{status === statuses.READY && ( {status === STATUSES.READY && (
<p> <p>
<a <a
className="link" className="link"
onClick={() => updatePublishForm({ uploadThumbnailStatus: statuses.MANUAL })} onClick={() => updatePublishForm({ uploadThumbnailStatus: STATUSES.MANUAL })}
> >
Enter URL Manually Enter URL Manually
</a> </a>
</p> </p>
)} )}
{status === statuses.MANUAL && ( {status === STATUSES.MANUAL && (
<p> <p>
<a <a
className="link" className="link"
onClick={() => updatePublishForm({ uploadThumbnailStatus: statuses.READY })} onClick={() => updatePublishForm({ uploadThumbnailStatus: STATUSES.READY })}
> >
Upload Thumbnail Upload Thumbnail
</a> </a>
</p> </p>
)} )}
{status === statuses.IN_PROGRESS && <p>uploading...</p>} {status === STATUSES.IN_PROGRESS && <p>uploading...</p>}
{status === statuses.COMPLETE && ( {status === STATUSES.COMPLETE && (
<div> <div>
<p className="form-field__label">{__('Thumbnail')}</p> <p className="form-field__label">{__('Thumbnail')}</p>
<p> <p>