From ef78bc6a084f92b4794e987b5832240d85b6479e Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 22 Jul 2020 14:05:15 +0200 Subject: refactor app using babel module-resolver --- .../views/upload/components/upload.index.js | 98 ---------------------- 1 file changed, 98 deletions(-) delete mode 100644 animism-align/frontend/views/upload/components/upload.index.js (limited to 'animism-align/frontend/views/upload/components/upload.index.js') diff --git a/animism-align/frontend/views/upload/components/upload.index.js b/animism-align/frontend/views/upload/components/upload.index.js deleted file mode 100644 index 3a7ae4b..0000000 --- a/animism-align/frontend/views/upload/components/upload.index.js +++ /dev/null @@ -1,98 +0,0 @@ -import React, { Component } from 'react' -import { Link } from 'react-router-dom' - -import { uploadUri, formatDateTime } from '../../../util' -import { MenuButton, SmallMenuButton, Loader } from '../../../common' -import actions from '../../../actions' - -import UploadIndexOptions from './upload.indexOptions' -import UploadMenu from './upload.menu' - -// const { result, collectionLookup } = this.props - -export default class UploadIndex extends Component { - componentDidMount() { - this.fetch(false) - } - - componentDidUpdate(prevProps) { - if (this.props.upload.options.sort !== prevProps.upload.options.sort) { - this.fetch(false) - } - } - - fetch(load_more) { - const { options, index } = this.props.upload - const { order: index_order } = index - const [ sort, order ] = options.sort.split('-') - actions.upload.index({ - sort, order, limit: 50, offset: load_more ? index_order.length : 0, - }, load_more) - } - - render() { - const { uploadActions } = this.props - const { options } = this.props.upload - const { loading, lookup, order } = this.props.upload.index - if (loading) { - return ( -
- -
- {order && !!order.length && -
- {order.map(id => )} -
- } -
- -
- ) - } - if (!lookup || !order.length) { - return ( -
- -
- -

- {"No uploads"} -

-
-
- ) - } - return ( -
- -
- -
- {order.map(id => )} -
-
- {order.length >= 50 && } -
- ) - } -} - -const UploadItem = ({ data }) => { - // console.log(data) - // const imageUri = uploadUri(data) - return ( -
-
- - {"Uploaded - -
-
-
- {formatDateTime(data.created_at)} -
-
-
- ) -} - -- cgit v1.2.3-70-g09d2