Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small changes #689

Open
wants to merge 7 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ yarn start:[network]
# yarn start:xdai
```

> **Tip:**
> Make sure you provide the environment variable of the RPC node when running on xDai. e.g.
> `REACT_APP_ETH_NODE=https://rpc.xdaichain.com/ yarn start:xdai`

### Environment variables


Expand Down
65 changes: 42 additions & 23 deletions src/components/Feed/ProposalCreator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useEffect, useState } from 'react'
import { Link } from 'react-router-dom'
Copy link
Member

Choose a reason for hiding this comment

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

As discussed on Discord, let´s use the Link component from @1hive/1hive-ui.

Copy link
Member

Choose a reason for hiding this comment

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

You an see an example here

import {
EthIdenticon,
GU,
Expand Down Expand Up @@ -54,23 +55,33 @@ function ProposalCreator({ proposal }) {
display: flex;
`}
>
<div>
{profile?.image ? (
<img
src={profile.image}
height="43"
width="43"
alt=""
css={`
border-radius: 50%;
display: block;
object-fit: cover;
`}
/>
) : (
<EthIdenticon address={proposal.creator} radius={50} scale={1.8} />
)}
</div>
<Link to={`/profile?account=${proposal.creator}`}>
Copy link
Member

Choose a reason for hiding this comment

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

With the previous comment, this should be now

Suggested change
<Link to={`/profile?account=${proposal.creator}`}>
<Link href={`/profile?account=${proposal.creator}`} external={false}>

<div>
{profile?.image ? (
<img
src={profile.image}
height="43"
width="43"
alt=""
css={`
border-radius: 50%;
display: block;
object-fit: cover;
cursor: pointer;
Copy link
Member

Choose a reason for hiding this comment

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

Using the Link component suggested we don´t need to set this style

Suggested change
cursor: pointer;

`}
/>
) : (
<EthIdenticon
address={proposal.creator}
radius={50}
scale={1.8}
css={`
cursor: pointer;
Copy link
Member

Choose a reason for hiding this comment

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

Same comment as above

`}
/>
)}
</div>
</Link>
<div
css={`
margin-left: ${1 * GU}px;
Expand All @@ -86,15 +97,23 @@ function ProposalCreator({ proposal }) {
ProposalType
) : (
<>
<strong
<Link
to={`/profile?account=${proposal.creator}`}
css={`
margin-right: ${1 * GU}px;
text-decoration: none;
`}
>
{profile?.name
? profile.name
: shortenAddress(proposal.creator)}
</strong>
<strong
css={`
margin-right: ${1 * GU}px;
cursor: pointer;
`}
>
{profile?.name
? profile.name
: shortenAddress(proposal.creator)}
</strong>
</Link>
<span
css={`
margin-right: ${0.5 * GU}px;
Expand Down
1 change: 1 addition & 0 deletions src/components/Feed/ProposalDescription.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ function ProposalDescription({ proposal, onSelectProposal }) {
cursor: pointer;
${textStyle('body1')};
margin-bottom: ${3 * GU}px;
text-decoration: underline;
`}
>
{proposal.type === ProposalTypes.Decision ? (
Expand Down
7 changes: 6 additions & 1 deletion src/components/Feed/ProposalInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ function ProposalInfo({ loading, proposal, onSelectProposal }) {
const tokenIcon = getTokenIconBySymbol(primaryToken.symbol)

return (
<div>
<div
onClick={onSelectProposal}
css={`
cursor: pointer;
`}
>
<ProposalDescription
proposal={proposal}
onSelectProposal={onSelectProposal}
Expand Down
132 changes: 65 additions & 67 deletions src/components/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
textStyle,
useLayout,
useTheme,
useViewport,
} from '@1hive/1hive-ui'
import styled from 'styled-components'
import Layout from './Layout'
Expand All @@ -23,85 +22,84 @@ import homeSvg from '../assets/home.svg'

function Footer() {
const theme = useTheme()
const { below } = useViewport()
const compactMode = below('large')

return (
<footer
css={`
flex-shrink: 0;
width: 100%;
padding: ${5 * GU}px ${3 * GU}px;
padding: ${1 * GU}px ${1.3 * GU}px;
background: ${theme.surface};
`}
>
<Layout paddingBottom={0}>
{compactMode ? (
<FixedFooter />
) : (
<Layout paddingBottom={70}>
<FixedFooter />
Copy link
Member

Choose a reason for hiding this comment

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

Why did we remove the compactMode condition? Note that we only want the Fixed Footer on smaller screen sizes

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed cursor:pointer.
Fixed the href properties to direct correctly.
Still need to configure the compact mode footer tooldbar.

<div
css={`
display: grid;
padding: 0px 0px 30px 10px;
grid-template-columns: repeat(auto-fit, minmax(100px, 0.3fr));
grid-row-gap: ${2 * GU}px;
& a {
color: ${theme.contentSecondary};
}
`}
>
<div>
<img src={logoSvg} height="40" alt="" />
</div>
<div
css={`
display: grid;
grid-template-columns: ${40 * GU}px ${25 * GU}px ${25 * GU}px;
grid-row-gap: ${2 * GU}px;

& a {
color: ${theme.contentSecondary};
}
line-height: 0.5;
`}
>
<div>
<img src={logoSvg} height="40" alt="" />
</div>
<div>
<h5
css={`
${textStyle('body1')};
margin-bottom: ${1.5 * GU}px;
`}
>
Community
</h5>
<Link href="https://discord.gg/4fm7pgB" external>
Discord
</Link>
<Link href="https://github.com/1Hive" external>
Github
</Link>
<Link href="https://twitter.com/1HiveOrg" external>
Twitter
</Link>
<Link href="https://t.me/honeyswapdex" external>
Telegram
</Link>
<Link href="https://forum.1hive.org/" external>
Forum
</Link>
</div>
<div>
<h5
css={`
${textStyle('body1')};
margin-bottom: ${1.5 * GU}px;
`}
>
Documentation
</h5>
<Link href="https://1hive.gitbook.io/1hive/" external>
Wiki
</Link>
<Link
href="https://1hive.gitbook.io/1hive/community/security/bug-bounty"
external
>
Bug Bounty
</Link>
<Link href="https://1hive.gitbook.io/1hive/guides/faq" external>
FAQs
</Link>
</div>
<h5
css={`
${textStyle('body1')};
margin-bottom: ${1.5 * GU}px;
`}
>
Community
</h5>
<Link href="https://discord.gg/4fm7pgB" external>
Discord
</Link>
<Link href="https://github.com/1Hive" external>
Github
</Link>
<Link href="https://twitter.com/1HiveOrg" external>
Twitter
</Link>
<Link href="https://t.me/honeyswapdex" external>
Telegram
</Link>
<Link href="https://forum.1hive.org/" external>
Forum
</Link>
</div>
<div>
<h5
css={`
${textStyle('body1')};
margin-bottom: ${1.5 * GU}px;
`}
>
Documentation
</h5>
<Link href="https://1hive.gitbook.io/1hive/" external>
Wiki
</Link>
<Link
href="https://1hive.gitbook.io/1hive/community/security/bug-bounty"
external
>
Bug Bounty
</Link>
<Link href="https://1hive.gitbook.io/1hive/guides/faq" external>
FAQs
</Link>
</div>
)}
</div>
)
</Layout>
</footer>
)
Expand Down