Refactor the MediaComponent and move the upload logic to SupportFormV2 comp

Summary: This diff refactors the MediaComponent and moves it's upload logic to the support component. Also the state of the media component is stored in the redux store, so this solves the caching issue.

Reviewed By: mweststrate

Differential Revision: D18754736

fbshipit-source-id: b937f34180405025a6eb437bf2c2d589743e341b
This commit is contained in:
Pritesh Nandgaonkar
2019-12-02 06:48:59 -08:00
committed by Facebook Github Bot
parent 3e7557260c
commit 02ce121332

View File

@@ -8,7 +8,11 @@
*/
import {Actions} from './';
export type MediaType = Array<{uri: string; description: string}>;
type SubmediaType =
| {uploadID: number; status: 'Uploaded'}
| {status: 'NotUploaded' | 'Uploading'};
type MediaObject = SubmediaType & {description: string; path: string};
export type MediaType = Array<MediaObject>;
export type SupportFormV2State = {
title: string;
description: string;