commit
d914f2418c
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 24 24" height="24px" id="Layer_1" version="1.1" viewBox="0 0 24 24" width="24px" xml:space="preserve"><path xmlns="http://www.w3.org/2000/svg" fill="#777777" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>
|
After Width: | Height: | Size: 839 B |
|
@ -90,7 +90,7 @@ export class DropdownComponent extends Component<Props, State> {
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
)}
|
)}
|
||||||
{options.map(({ label: optionLabel, onClick }) => (
|
{options.map(({ label: optionLabel, onClick }) => (
|
||||||
<MenuItem onClick={onClick}>
|
<MenuItem onClick={onClick} key={optionLabel}>
|
||||||
<TextComponent value={optionLabel} />
|
<TextComponent value={optionLabel} />
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
))}
|
))}
|
||||||
|
|
|
@ -0,0 +1,117 @@
|
||||||
|
// @flow
|
||||||
|
import React, { PureComponent, Fragment, type Element } from 'react';
|
||||||
|
import { createPortal } from 'react-dom';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
|
const ModalWrapper = styled.div`
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
position: fixed;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 10;
|
||||||
|
background-color: rgba(0, 0, 0, 0.4);
|
||||||
|
`;
|
||||||
|
|
||||||
|
const ChildrenWrapper = styled.div`
|
||||||
|
z-index: 90;
|
||||||
|
`;
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
renderTrigger: (() => void) => Element<*>,
|
||||||
|
children: (() => void) => Element<*>,
|
||||||
|
closeOnBackdropClick?: boolean,
|
||||||
|
closeOnEsc?: boolean,
|
||||||
|
};
|
||||||
|
|
||||||
|
type State = {
|
||||||
|
isVisible: boolean,
|
||||||
|
};
|
||||||
|
|
||||||
|
const modalRoot = document.getElementById('modal-root');
|
||||||
|
|
||||||
|
export class ModalComponent extends PureComponent<Props, State> {
|
||||||
|
element = document.createElement('div');
|
||||||
|
|
||||||
|
static defaultProps = {
|
||||||
|
closeOnBackdropClick: true,
|
||||||
|
closeOnEsc: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
state = {
|
||||||
|
isVisible: false,
|
||||||
|
};
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
const { closeOnEsc } = this.props;
|
||||||
|
|
||||||
|
if (closeOnEsc) {
|
||||||
|
window.addEventListener('keydown', this.handleEscPress);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
const { closeOnEsc } = this.props;
|
||||||
|
|
||||||
|
if (closeOnEsc) {
|
||||||
|
window.removeEventListener('keydown', this.handleEscPress);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
handleEscPress = (event: Object) => {
|
||||||
|
const { isVisible } = this.state;
|
||||||
|
|
||||||
|
if (event.key === 'Escape' && isVisible) {
|
||||||
|
this.close();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
open = () => {
|
||||||
|
this.setState(
|
||||||
|
() => ({ isVisible: true }),
|
||||||
|
() => {
|
||||||
|
if (modalRoot) modalRoot.appendChild(this.element);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
close = () => {
|
||||||
|
this.setState(
|
||||||
|
() => ({ isVisible: false }),
|
||||||
|
() => {
|
||||||
|
if (modalRoot) modalRoot.removeChild(this.element);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { renderTrigger, children, closeOnBackdropClick } = this.props;
|
||||||
|
const { isVisible } = this.state;
|
||||||
|
const toggleVisibility = isVisible ? this.close : this.open;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Fragment>
|
||||||
|
{renderTrigger(toggleVisibility)}
|
||||||
|
{isVisible
|
||||||
|
? createPortal(
|
||||||
|
<ModalWrapper
|
||||||
|
id='modal-portal-wrapper'
|
||||||
|
onClick={(event) => {
|
||||||
|
if (
|
||||||
|
closeOnBackdropClick
|
||||||
|
&& event.target.id === 'modal-portal-wrapper'
|
||||||
|
) this.close();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ChildrenWrapper>{children(toggleVisibility)}</ChildrenWrapper>
|
||||||
|
</ModalWrapper>,
|
||||||
|
this.element,
|
||||||
|
)
|
||||||
|
: null}
|
||||||
|
</Fragment>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,57 @@
|
||||||
|
---
|
||||||
|
name: Modal
|
||||||
|
---
|
||||||
|
|
||||||
|
import { Playground, PropsTable } from 'docz'
|
||||||
|
|
||||||
|
import { ModalComponent } from './modal.js'
|
||||||
|
|
||||||
|
# Modal
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
<PropsTable of={ModalComponent} />
|
||||||
|
|
||||||
|
## Basic usage
|
||||||
|
|
||||||
|
<Playground>
|
||||||
|
<ModalComponent
|
||||||
|
renderTrigger={toggleVisibility => (
|
||||||
|
<button type="button" onClick={toggleVisibility}>
|
||||||
|
Open Modal
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{toggleVisibility => (
|
||||||
|
<div style={{ padding: '50px', backgroundColor: 'white' }}>
|
||||||
|
Modal Content
|
||||||
|
<button type="button" onClick={toggleVisibility}>
|
||||||
|
Close Modal
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</ModalComponent>
|
||||||
|
</Playground>
|
||||||
|
|
||||||
|
## Don't close with ESC or backdrop click
|
||||||
|
|
||||||
|
<Playground>
|
||||||
|
<ModalComponent
|
||||||
|
closeOnEsc={false}
|
||||||
|
closeOnBackdropClick={false}
|
||||||
|
renderTrigger={toggleVisibility => (
|
||||||
|
<button type="button" onClick={toggleVisibility}>
|
||||||
|
Open Modal
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{toggleVisibility => (
|
||||||
|
<div style={{ padding: '50px', backgroundColor: 'white' }}>
|
||||||
|
Modal Content
|
||||||
|
<button type="button" onClick={toggleVisibility}>
|
||||||
|
Close Modal
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</ModalComponent>
|
||||||
|
</Playground>
|
|
@ -1,5 +1,5 @@
|
||||||
// @flow
|
// @flow
|
||||||
import React from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { TransactionItemComponent, type Transaction } from './transaction-item';
|
import { TransactionItemComponent, type Transaction } from './transaction-item';
|
||||||
import { TextComponent } from './text';
|
import { TextComponent } from './text';
|
||||||
|
@ -46,11 +46,13 @@ export const TransactionDailyComponent = ({
|
||||||
<Wrapper>
|
<Wrapper>
|
||||||
<Day value={transactionsDate} />
|
<Day value={transactionsDate} />
|
||||||
<TransactionsWrapper>
|
<TransactionsWrapper>
|
||||||
{transactions.map(({
|
{transactions.map(
|
||||||
date, type, address, amount,
|
({
|
||||||
|
date, type, address, amount, transactionId,
|
||||||
}, idx) => (
|
}, idx) => (
|
||||||
<div>
|
<Fragment key={`${address}-${type}-${amount}-${date}`}>
|
||||||
<TransactionItemComponent
|
<TransactionItemComponent
|
||||||
|
transactionId={transactionId}
|
||||||
type={type}
|
type={type}
|
||||||
date={date}
|
date={date}
|
||||||
address={address || ''}
|
address={address || ''}
|
||||||
|
@ -58,8 +60,9 @@ export const TransactionDailyComponent = ({
|
||||||
zecPrice={zecPrice}
|
zecPrice={zecPrice}
|
||||||
/>
|
/>
|
||||||
{idx < transactions.length - 1 && <Divider />}
|
{idx < transactions.length - 1 && <Divider />}
|
||||||
</div>
|
</Fragment>
|
||||||
))}
|
),
|
||||||
|
)}
|
||||||
</TransactionsWrapper>
|
</TransactionsWrapper>
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
);
|
);
|
||||||
|
|
|
@ -0,0 +1,176 @@
|
||||||
|
// @flow
|
||||||
|
import React from 'react';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
import dateFns from 'date-fns';
|
||||||
|
|
||||||
|
import SentIcon from '../assets/images/transaction_sent_icon.svg';
|
||||||
|
import ReceivedIcon from '../assets/images/transaction_received_icon.svg';
|
||||||
|
import CloseIcon from '../assets/images/close_icon.svg';
|
||||||
|
|
||||||
|
import { TextComponent } from './text';
|
||||||
|
import { RowComponent } from './row';
|
||||||
|
import { ColumnComponent } from './column';
|
||||||
|
|
||||||
|
import theme from '../theme';
|
||||||
|
|
||||||
|
import formatNumber from '../utils/formatNumber';
|
||||||
|
import truncateAddress from '../utils/truncateAddress';
|
||||||
|
|
||||||
|
const Wrapper = styled.div`
|
||||||
|
width: 30vw;
|
||||||
|
background-color: ${props => props.theme.colors.background};
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
border-radius: 6px;
|
||||||
|
box-shadow: 0px 0px 30px 0px black;
|
||||||
|
`;
|
||||||
|
|
||||||
|
const TitleWrapper = styled.div`
|
||||||
|
margin-top: 20px;
|
||||||
|
`;
|
||||||
|
|
||||||
|
const Icon = styled.img`
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
margin: 20px 0;
|
||||||
|
`;
|
||||||
|
|
||||||
|
const CloseIconWrapper = styled.div`
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
align-items: flex-end;
|
||||||
|
justify-content: flex-end;
|
||||||
|
`;
|
||||||
|
|
||||||
|
const CloseIconImg = styled.img`
|
||||||
|
width: 12.5px;
|
||||||
|
height: 12.5px;
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
`;
|
||||||
|
|
||||||
|
const InfoRow = styled(RowComponent)`
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 80px;
|
||||||
|
padding: 0 30px;
|
||||||
|
`;
|
||||||
|
|
||||||
|
const Divider = styled.div`
|
||||||
|
width: 100%;
|
||||||
|
background-color: ${props => props.theme.colors.transactionsDetailsLabel};
|
||||||
|
height: 1px;
|
||||||
|
opacity: 0.5;
|
||||||
|
`;
|
||||||
|
|
||||||
|
const Label = styled(TextComponent)`
|
||||||
|
font-weight: ${props => props.theme.fontWeight.bold};
|
||||||
|
color: ${props => props.theme.colors.transactionsDetailsLabel};
|
||||||
|
margin-bottom: 5px;
|
||||||
|
`;
|
||||||
|
|
||||||
|
const Ellipsis = styled(TextComponent)`
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
width: calc(30vw - 60px);
|
||||||
|
`;
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
amount: number,
|
||||||
|
type: 'send' | 'receive',
|
||||||
|
zecPrice: number,
|
||||||
|
date: string,
|
||||||
|
transactionId: string,
|
||||||
|
from: string,
|
||||||
|
to: string,
|
||||||
|
handleClose: () => void,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const TransactionDetailsComponent = ({
|
||||||
|
amount,
|
||||||
|
type,
|
||||||
|
zecPrice,
|
||||||
|
date,
|
||||||
|
transactionId,
|
||||||
|
from,
|
||||||
|
to,
|
||||||
|
handleClose,
|
||||||
|
}: Props) => {
|
||||||
|
const isReceived = type === 'receive';
|
||||||
|
return (
|
||||||
|
<Wrapper>
|
||||||
|
<CloseIconWrapper>
|
||||||
|
<CloseIconImg src={CloseIcon} onClick={handleClose} />
|
||||||
|
</CloseIconWrapper>
|
||||||
|
<TitleWrapper>
|
||||||
|
<TextComponent value='Transaction Details' align='center' />
|
||||||
|
</TitleWrapper>
|
||||||
|
<Icon
|
||||||
|
src={isReceived ? ReceivedIcon : SentIcon}
|
||||||
|
alt='Transaction Type Icon'
|
||||||
|
/>
|
||||||
|
<TextComponent
|
||||||
|
value={formatNumber({
|
||||||
|
append: `${isReceived ? '+' : '-'}ZEC `,
|
||||||
|
value: amount,
|
||||||
|
})}
|
||||||
|
color={
|
||||||
|
isReceived
|
||||||
|
? theme.colors.transactionReceived
|
||||||
|
: theme.colors.transactionSent
|
||||||
|
}
|
||||||
|
isBold
|
||||||
|
size={2.625}
|
||||||
|
/>
|
||||||
|
<TextComponent
|
||||||
|
value={formatNumber({
|
||||||
|
append: `${isReceived ? '+' : '-'}USD `,
|
||||||
|
value: amount * zecPrice,
|
||||||
|
})}
|
||||||
|
size={1.5}
|
||||||
|
color={theme.colors.transactionsDetailsLabel}
|
||||||
|
/>
|
||||||
|
<InfoRow>
|
||||||
|
<ColumnComponent>
|
||||||
|
<Label value='DATE' />
|
||||||
|
<TextComponent value={dateFns.format(date, 'MMMM D, YYYY HH:MMA')} />
|
||||||
|
</ColumnComponent>
|
||||||
|
<ColumnComponent>
|
||||||
|
<TextComponent
|
||||||
|
value='FEES'
|
||||||
|
isBold
|
||||||
|
color={theme.colors.transactionsDetailsLabel}
|
||||||
|
/>
|
||||||
|
<TextComponent
|
||||||
|
value={formatNumber({ value: amount * 0.1, append: 'ZEC ' })}
|
||||||
|
/>
|
||||||
|
</ColumnComponent>
|
||||||
|
</InfoRow>
|
||||||
|
<Divider />
|
||||||
|
<InfoRow>
|
||||||
|
<ColumnComponent>
|
||||||
|
<Label value='TRANSACTION ID' />
|
||||||
|
<Ellipsis value={transactionId} />
|
||||||
|
</ColumnComponent>
|
||||||
|
</InfoRow>
|
||||||
|
<Divider />
|
||||||
|
<InfoRow>
|
||||||
|
<ColumnComponent>
|
||||||
|
<Label value='FROM' />
|
||||||
|
<TextComponent value={truncateAddress(from)} />
|
||||||
|
</ColumnComponent>
|
||||||
|
</InfoRow>
|
||||||
|
<Divider />
|
||||||
|
<InfoRow>
|
||||||
|
<ColumnComponent>
|
||||||
|
<Label value='TO' />
|
||||||
|
<TextComponent value={truncateAddress(to)} />
|
||||||
|
</ColumnComponent>
|
||||||
|
</InfoRow>
|
||||||
|
</Wrapper>
|
||||||
|
);
|
||||||
|
};
|
|
@ -0,0 +1,32 @@
|
||||||
|
---
|
||||||
|
name: Transaction Details
|
||||||
|
---
|
||||||
|
|
||||||
|
import { Playground, PropsTable } from 'docz'
|
||||||
|
|
||||||
|
import { TransactionDetails } from './transaction-details.js'
|
||||||
|
import { DoczWrapper } from '../theme.js'
|
||||||
|
|
||||||
|
# Transaction Details
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
<PropsTable of={TransactionDetails} />
|
||||||
|
|
||||||
|
## Basic Usage
|
||||||
|
|
||||||
|
<Playground>
|
||||||
|
<DoczWrapper>
|
||||||
|
{() => (
|
||||||
|
<TransactionDetails
|
||||||
|
type="receive"
|
||||||
|
amount={2851}
|
||||||
|
zecPrice={56}
|
||||||
|
transactionId="asdh8233uhd89as283dhuashd23-493iskdfdnhdufhs"
|
||||||
|
from="WKSJniasnxusiuhd898ns13umdoioj93287yhnjknxU"
|
||||||
|
to="WKSJniasnxusiuhd898ns13umdoioj93287yhnjknxU"
|
||||||
|
date={new Date().toISOString()}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</DoczWrapper>
|
||||||
|
</Playground>
|
|
@ -9,6 +9,8 @@ import ReceivedIcon from '../assets/images/transaction_received_icon.svg';
|
||||||
import { RowComponent } from './row';
|
import { RowComponent } from './row';
|
||||||
import { ColumnComponent } from './column';
|
import { ColumnComponent } from './column';
|
||||||
import { TextComponent } from './text';
|
import { TextComponent } from './text';
|
||||||
|
import { ModalComponent } from './modal';
|
||||||
|
import { TransactionDetailsComponent } from './transaction-details';
|
||||||
|
|
||||||
import theme from '../theme';
|
import theme from '../theme';
|
||||||
|
|
||||||
|
@ -53,6 +55,7 @@ export type Transaction = {
|
||||||
address: string,
|
address: string,
|
||||||
amount: number,
|
amount: number,
|
||||||
zecPrice: number,
|
zecPrice: number,
|
||||||
|
transactionId: string,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const TransactionItemComponent = ({
|
export const TransactionItemComponent = ({
|
||||||
|
@ -61,6 +64,7 @@ export const TransactionItemComponent = ({
|
||||||
address,
|
address,
|
||||||
amount,
|
amount,
|
||||||
zecPrice,
|
zecPrice,
|
||||||
|
transactionId,
|
||||||
}: Transaction) => {
|
}: Transaction) => {
|
||||||
const isReceived = type === 'receive';
|
const isReceived = type === 'receive';
|
||||||
const transactionTime = dateFns.format(new Date(date), 'HH:mm A');
|
const transactionTime = dateFns.format(new Date(date), 'HH:mm A');
|
||||||
|
@ -75,7 +79,13 @@ export const TransactionItemComponent = ({
|
||||||
const transactionAddress = truncateAddress(address);
|
const transactionAddress = truncateAddress(address);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Wrapper alignItems='center' justifyContent='space-between'>
|
<ModalComponent
|
||||||
|
renderTrigger={toggleVisibility => (
|
||||||
|
<Wrapper
|
||||||
|
alignItems='center'
|
||||||
|
justifyContent='space-between'
|
||||||
|
onClick={toggleVisibility}
|
||||||
|
>
|
||||||
<RowComponent alignItems='center'>
|
<RowComponent alignItems='center'>
|
||||||
<RowComponent alignItems='center'>
|
<RowComponent alignItems='center'>
|
||||||
<Icon
|
<Icon
|
||||||
|
@ -104,5 +114,20 @@ export const TransactionItemComponent = ({
|
||||||
/>
|
/>
|
||||||
</ColumnComponent>
|
</ColumnComponent>
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{toggleVisibility => (
|
||||||
|
<TransactionDetailsComponent
|
||||||
|
amount={amount}
|
||||||
|
date={date}
|
||||||
|
from={address}
|
||||||
|
to=''
|
||||||
|
transactionId={transactionId}
|
||||||
|
handleClose={toggleVisibility}
|
||||||
|
type={type}
|
||||||
|
zecPrice={zecPrice}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</ModalComponent>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -41,9 +41,7 @@ const mapDispatchToProps = (dispatch: Dispatch) => ({
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
if (addressesErr) return dispatch(loadWalletSummaryError({ error: addressesErr.message }));
|
if (addressesErr) return dispatch(loadWalletSummaryError({ error: addressesErr.message }));
|
||||||
|
|
||||||
const [transactionsErr, transactions = []] = await eres(
|
const [transactionsErr, transactions] = await eres(rpc.listtransactions());
|
||||||
rpc.listtransactions(),
|
|
||||||
);
|
|
||||||
|
|
||||||
if (transactionsErr) {
|
if (transactionsErr) {
|
||||||
return dispatch(
|
return dispatch(
|
||||||
|
@ -59,6 +57,7 @@ const mapDispatchToProps = (dispatch: Dispatch) => ({
|
||||||
addresses,
|
addresses,
|
||||||
transactions: flow([
|
transactions: flow([
|
||||||
arr => arr.map(transaction => ({
|
arr => arr.map(transaction => ({
|
||||||
|
transactionId: transaction.txid,
|
||||||
type: transaction.category,
|
type: transaction.category,
|
||||||
date: new Date(transaction.time * 1000).toISOString(),
|
date: new Date(transaction.time * 1000).toISOString(),
|
||||||
address: transaction.address,
|
address: transaction.address,
|
||||||
|
|
|
@ -42,6 +42,7 @@ const mapDispatchToProps = (dispatch: Dispatch) => ({
|
||||||
loadTransactionsSuccess({
|
loadTransactionsSuccess({
|
||||||
list: flow([
|
list: flow([
|
||||||
arr => arr.map(transaction => ({
|
arr => arr.map(transaction => ({
|
||||||
|
transactionId: transaction.txid,
|
||||||
type: transaction.category,
|
type: transaction.category,
|
||||||
date: new Date(transaction.time * 1000).toISOString(),
|
date: new Date(transaction.time * 1000).toISOString(),
|
||||||
address: transaction.address,
|
address: transaction.address,
|
||||||
|
|
|
@ -23,6 +23,7 @@ const transactionSent = '#FF6C6C';
|
||||||
const transactionReceived = '#6AEAC0';
|
const transactionReceived = '#6AEAC0';
|
||||||
const transactionsDate = '#777777';
|
const transactionsDate = '#777777';
|
||||||
const transactionsItemHovered = '#222222';
|
const transactionsItemHovered = '#222222';
|
||||||
|
const transactionsDetailsLabel = transactionsDate;
|
||||||
|
|
||||||
const appTheme = {
|
const appTheme = {
|
||||||
mode: DARK,
|
mode: DARK,
|
||||||
|
@ -61,6 +62,7 @@ const appTheme = {
|
||||||
transactionReceived,
|
transactionReceived,
|
||||||
transactionsDate,
|
transactionsDate,
|
||||||
transactionsItemHovered,
|
transactionsItemHovered,
|
||||||
|
transactionsDetailsLabel,
|
||||||
},
|
},
|
||||||
sidebarWidth: '200px',
|
sidebarWidth: '200px',
|
||||||
headerHeight: '60px',
|
headerHeight: '60px',
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
|
||||||
export default ({ value, append = '' }: { value: number, append?: string }) => `${append}${(value || 0).toLocaleString('de-DE')}`;
|
export default ({ value, append = '' }: { value: number, append?: string }) => `${append}${(value || 0).toLocaleString()}`;
|
||||||
|
|
|
@ -14,5 +14,8 @@ export default {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
body: {
|
||||||
|
raw: '<div id="modal-root" />',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,8 +13,7 @@
|
||||||
<body>
|
<body>
|
||||||
<noscript> You need to enable JavaScript to run this app. </noscript>
|
<noscript> You need to enable JavaScript to run this app. </noscript>
|
||||||
|
|
||||||
<!-- React App Inject -->
|
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
<!-- End React App Inject -->
|
<div id="modal-root"></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue