Skip to content
This repository was archived by the owner on Feb 18, 2020. It is now read-only.

Feature/wallet - separation of Header Components#5

Merged
W3stside merged 18 commits intocomponentsfrom
feature/Wallet
Oct 26, 2017
Merged

Feature/wallet - separation of Header Components#5
W3stside merged 18 commits intocomponentsfrom
feature/Wallet

Conversation

@W3stside
Copy link
Copy Markdown
Contributor

Separated Header into 4 components

  1. Header wrapper - renders the other 3
  2. MenuWallet - shows Account and Balance
  3. MenuAuctions - shows current auctions and tokens
  4. Hamburger - hamburger button + sliding panel

…o smart container - unrelated: deleted truffleTest.js as unused
… claim tokens, changed _navbar.scss td color to black, fixed general syntax bugs - running in Storybook
…Hamburger nav menu. Added show, hide classes on click in new Hamburger class w/internal state
…dded an extra div in the header > div > nav styling chain due to the necessary wrapping of the Hamburger.tsx component - TS typing does not support React 16 rendering completely yet
@W3stside W3stside requested a review from Velenir October 25, 2017 17:11
@W3stside W3stside changed the base branch from master to components October 25, 2017 17:11
Comment thread src/components/Hamburger/index.tsx Outdated
}

export default class Hamburger extends Component<HamburgerProps, HamburgerState> {
constructor(props: HamburgerProps) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is mostly a matter of taste, but a shorter alternative would be to use class props:

state = { isOpen: false}
handleClick = () => this.State({ isOpen: !this.state.isOpen })

and no need for constructor

Comment thread src/components/MenuWallet/index.tsx Outdated
{/* Wallet Info - Address && Balance */}
<span>
<code>{`${account ? account.slice(0,14) : 'loading...'}...`}</code>
<small>{balance ? balance : 'loading...'} ETH</small>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it'll display loading... when balance === 0

Comment thread stories/MenuAuction.tsx Outdated
separator: any
) => ({
name: text('title', name),
ongoingAuctions: array('Ongoing Auctions', auctionsArr, separator)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ongoingAuctions knob displays [Object] as it JSON.stringifies it like that
storybook-knobs don't allow to edit array of objects easily
a workaround would be to add a knob for each auction:

ongoingAuctions: auctionsArr.map((auction, i) => object(`Ongoing Auction ${i}`, auction)),

also would be nice to have more auctions, even randomly generated

@W3stside W3stside merged commit 9c16a9f into components Oct 26, 2017
@W3stside W3stside deleted the feature/Wallet branch October 26, 2017 14:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants