Skip to content

Commit

Permalink
feat: HomePage
Browse files Browse the repository at this point in the history
  • Loading branch information
2fd committed Sep 2, 2020
1 parent d868275 commit 031199d
Show file tree
Hide file tree
Showing 42 changed files with 655 additions and 288 deletions.
6 changes: 1 addition & 5 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
REACT_APP_LOCAL_STORAGE_KEY=
REACT_APP_SEGMENT_KEY=

# Aragon
REACT_APP_ORGANIZATION_LOCATION=
REACT_APP_ORGANIZATION_CONNECTOR=
REACT_APP_ORGANIZATION_NETWORK=
REACT_APP_DEFAULT_NETWORK_ID=
174 changes: 88 additions & 86 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@aragon/connect": "^0.6.0",
"@aragon/connect": "^0.7.0-beta.3",
"@aragon/connect-thegraph-voting": "^0.4.2",
"@ethersproject/providers": "^5.0.5",
"@testing-library/jest-dom": "^4.2.4",
Expand All @@ -18,7 +18,7 @@
"connected-react-router": "^6.8.0",
"dcl-tslint-config-standard": "^2.0.0",
"decentraland-commons": "^5.2.0",
"decentraland-dapps": "^7.10.1",
"decentraland-dapps": "^7.13.0",
"decentraland-eth": "^8.18.2",
"decentraland-ui": "^2.23.0",
"devcert": "^1.1.2",
Expand All @@ -34,13 +34,15 @@
"redux-logger": "^3.0.6",
"redux-saga": "^1.1.3",
"reselect": "^4.0.0",
"ts-node": "^9.0.0",
"tslint-plugin-prettier": "^2.3.0",
"typescript": "^3.9.7"
},
"scripts": {
"start": "node ./bin/ssl.js && HTTPS=true SSL_CRT_FILE=.ssl/cert.crt SSL_KEY_FILE=.ssl/cert.key react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test"
"test": "react-scripts test",
"aragon": "ts-node -O '{\"isolatedModules\":false,\"module\":\"commonjs\"}' aragon.ts"
},
"eslintConfig": {
"extends": "react-app"
Expand Down
18 changes: 9 additions & 9 deletions src/components/HomePage/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ import React from 'react'
import { Page } from 'decentraland-ui/dist/components/Page/Page'
import { Header } from 'decentraland-ui/dist/components/Header/Header'
import { Empty } from 'decentraland-ui/dist/components/Empty/Empty'
import { Loader } from 'decentraland-ui/dist/components/Loader/Loader'
import Grid from 'semantic-ui-react/dist/commonjs/collections/Grid'
import { Props } from './HomePage.types'
import Navbar from 'components/Navbar/Navbar'
import Footer from 'components/Footer/Footer'
import { Navbar } from 'components/Navbar'
import { Footer } from 'components/Footer'
import { Navigation } from 'components/Navigation'
import { NavigationTab } from 'components/Navigation/Navigation.types'
import { Loader } from 'decentraland-ui'
import { t } from 'decentraland-dapps/dist/modules/translation/utils'
import { WrappingSummary } from 'components/Wrapping/WrappingSummary'
import { ProposalSummary } from 'components/Proposal/ProposalSummary'
import { NavigationTab } from 'components/Navigation/Navigation.types'
import { t } from 'decentraland-dapps/dist/modules/translation/utils'

import './HomePage.css'

Expand All @@ -25,14 +25,14 @@ export default class HomePage extends React.PureComponent<Props, any> {
<Grid stackable>
<Grid.Row>
<Grid.Column mobile="5">
<Header sub>{t('proposals.wrapping_header')}</Header>
<Header sub>{t('proposals_page.wrapping_header')}</Header>
<WrappingSummary />
</Grid.Column>
<Grid.Column mobile="11">
<Header sub>{t('proposals.proposals_header', { proposals: votes?.length || 0 })}</Header>
<Header sub>{t('proposals_page.proposals_header', { proposals: votes?.length || 0 })}</Header>
{isLoading && <Loader size="huge" active/>}
{!isLoading && (!votes || votes.length === 0) && <Empty height={100}>{t("proposals.empty")}</Empty>}
{!isLoading && votes && votes.length && votes.map(vote => <ProposalSummary key={vote.id} vote={vote}/>)}
{!isLoading && (!votes || votes.length === 0) && <Empty height={100}>{t('proposals_page.empty')}</Empty>}
{!isLoading && votes && votes.length > 0 && votes.map(vote => <ProposalSummary key={vote.id} vote={vote}/>)}
</Grid.Column>
</Grid.Row>
</Grid>
Expand Down
Loading

0 comments on commit 031199d

Please sign in to comment.