{showHint ? (
diff --git a/src/components/Garden/Feed/Delegation.tsx b/src/components/Garden/Feed/Delegation.tsx
index 482182035..a1ff9cec7 100644
--- a/src/components/Garden/Feed/Delegation.tsx
+++ b/src/components/Garden/Feed/Delegation.tsx
@@ -1,5 +1,5 @@
import React, { useCallback } from 'react'
-import { useHistory } from 'react-router'
+import { useRouter } from 'next/router'
import {
Box,
Button,
@@ -15,8 +15,6 @@ import useProfile from '@hooks/useProfile'
import { useSupporterSubscription } from '@hooks/useSubscriptions'
import { useWallet } from '@providers/Wallet'
-
-
type DelegationProps = {
onRemoveDelegate: () => void
onSetDelegate: () => void
@@ -108,12 +106,13 @@ function Representative({
representative,
}: RepresentativeProps) {
const theme = useTheme()
- const history = useHistory()
+ const router = useRouter()
+ // const profile = useProfile(representative.address)
const profile: any = useProfile(representative.address)
const handleViewProfile = useCallback(() => {
- history.push(`/profile?account=${representative.address}`)
- }, [history, representative])
+ router.push(`/profile?account=${representative.address}`)
+ }, [router, representative])
return (
diff --git a/src/components/Garden/Feed/HeroBanner.tsx b/src/components/Garden/Feed/HeroBanner.tsx
index 5ec6a13e6..ac4a9ebae 100644
--- a/src/components/Garden/Feed/HeroBanner.tsx
+++ b/src/components/Garden/Feed/HeroBanner.tsx
@@ -10,22 +10,25 @@ import {
import { useWallet } from '@providers/Wallet'
import { useAppTheme } from '@providers/AppTheme'
-import desktopBanner from '@assets/banner.png'
-import mobileBanner from '@assets/banner-mobile.png'
-import tabletBanner from '@assets/banner-tablet.png'
-import tabletBannerFull from '@assets/banner-tablet-full.png'
+import desktopBanner from '@images/icons/base/banner.png'
+import mobileBanner from '@images/icons/base/banner-mobile.png'
+import tabletBanner from '@images/icons/base/banner-tablet.png'
+import tabletBannerFull from '@images/icons/base/banner-tablet-full.png'
-import desktopBannerDark from '@assets/dark-mode/banner.png'
-import mobileBannerDark from '@assets/dark-mode/banner-mobile.png'
-import tabletBannerDark from '@assets/dark-mode/banner-tablet.png'
-import tabletBannerFullDark from '@assets/dark-mode/banner-tablet-full.png'
+import desktopBannerDark from '@images/icons/dark-mode/banner.png'
+import mobileBannerDark from '@images/icons/dark-mode/banner-mobile.png'
+import tabletBannerDark from '@images/icons/dark-mode/banner-tablet.png'
+import tabletBannerFullDark from '@images/icons/dark-mode/banner-tablet-full.png'
const BANNERS = {
- small: { image: mobileBanner, aspectRatio: '54%' },
- medium: { image: tabletBanner, aspectRatio: '36%' },
- medium_full: { image: tabletBannerFull, aspectRatio: '36%' },
- large: { image: desktopBanner, aspectRatio: '159%' },
- max: { image: desktopBanner, aspectRatio: '159%' },
+ small: { image: '/icons/base/banner-mobile.png', aspectRatio: '54%' },
+ medium: { image: '/icons/base/banner-tablet.png', aspectRatio: '36%' },
+ medium_full: {
+ image: '/icons/base/banner-tablet-full.png',
+ aspectRatio: '36%',
+ },
+ large: { image: '/icons/base/banner.png', aspectRatio: '159%' },
+ max: { image: '/icons/base/banner.png', aspectRatio: '159%' },
}
const BANNERS_DARK_MODE = {
diff --git a/src/components/Garden/Feed/ProposalCard.tsx b/src/components/Garden/Feed/ProposalCard.tsx
index e5008b566..12624ecb7 100644
--- a/src/components/Garden/Feed/ProposalCard.tsx
+++ b/src/components/Garden/Feed/ProposalCard.tsx
@@ -1,5 +1,5 @@
import React, { useCallback } from 'react'
-import { useHistory } from 'react-router-dom'
+import { useRouter } from 'next/router'
import { GU, useTheme, useViewport } from '@1hive/1hive-ui'
import ProposalFooter from './ProposalFooter'
@@ -31,25 +31,22 @@ function ConvictionProposalCard({ proposal, ...props }: CardProps) {
function Card({ loading = false, proposal }: CardProps) {
const theme = useTheme()
- const history = useHistory()
+ const router = useRouter()
const { below } = useViewport()
const handleSelectProposal = useCallback(() => {
const entityPath =
proposal.type === ProposalTypes.Decision ? 'vote' : 'proposal'
- const path = buildGardenPath(
- history.location,
- `${entityPath}/${proposal.number}`
- )
- history.push(path)
- }, [history, proposal.number, proposal.type])
+ const path = buildGardenPath(router, `${entityPath}/${proposal.number}`)
+ router.push(path)
+ }, [router, proposal.number, proposal.type])
const handleViewProfile = useCallback(
(proposalCreator) => {
- history.push(`/profile?account=${proposalCreator}`)
+ router.push(`/profile?account=${proposalCreator}`)
},
- [history]
+ [router]
)
return (
diff --git a/src/components/Garden/Feed/ProposalRankings.tsx b/src/components/Garden/Feed/ProposalRankings.tsx
index 789bf0303..858605261 100644
--- a/src/components/Garden/Feed/ProposalRankings.tsx
+++ b/src/components/Garden/Feed/ProposalRankings.tsx
@@ -2,16 +2,16 @@ import React, { useCallback } from 'react'
import { GU, textStyle, useTheme } from '@1hive/1hive-ui'
import { useAppTheme } from '@providers/AppTheme'
-import iconTopSvg from '@assets/rankings/ranking-top.svg'
-import iconTopSelectedSvg from '@assets/rankings/ranking-top-selected.svg'
-import iconNewSvg from '@assets/rankings/ranking-new.svg'
-import iconNewSelectedSvg from '@assets/rankings/ranking-new-selected.svg'
+import iconTopSvg from '@images/icons/base/rankings/ranking-top.svg'
+import iconTopSelectedSvg from '@images/icons/base/rankings/ranking-top-selected.svg'
+import iconNewSvg from '@images/icons/base/rankings/ranking-new.svg'
+import iconNewSelectedSvg from '@images/icons/base/rankings/ranking-new-selected.svg'
// DarkMode svg
-import iconTopSvgDarkMode from '@assets/dark-mode/ranking-top.svg'
-import iconTopSelectedSvgDarkMode from '@assets/dark-mode/ranking-top-selected.svg'
-import iconNewSvgDarkMode from '@assets/dark-mode/ranking-new.svg'
-import iconNewSelectedSvgDarkMode from '@assets/dark-mode/ranking-new-selected.svg'
+import iconTopSvgDarkMode from '@images/icons/dark-mode/ranking-top.svg'
+import iconTopSelectedSvgDarkMode from '@images/icons/dark-mode/ranking-top-selected.svg'
+import iconNewSvgDarkMode from '@images/icons/dark-mode/ranking-new.svg'
+import iconNewSelectedSvgDarkMode from '@images/icons/dark-mode/ranking-new-selected.svg'
const iconsMapping: {
[x: string]: {
@@ -21,13 +21,13 @@ const iconsMapping: {
}
} = {
top: {
- icon: iconTopSvg,
- iconSelected: iconTopSelectedSvg,
+ icon: '/icons/rankings/ranking-top.svg',
+ iconSelected: '/icons/rankings/ranking-top-selected.svg',
label: 'Most supported',
},
new: {
- icon: iconNewSvg,
- iconSelected: iconNewSelectedSvg,
+ icon: '/icons/rankings/ranking-new.svg',
+ iconSelected: '/icons/rankings/ranking-new-selected.svg',
label: 'Newest',
},
}
diff --git a/src/components/Garden/Feed/ProposalsList.tsx b/src/components/Garden/Feed/ProposalsList.tsx
index ce7419813..69028cded 100644
--- a/src/components/Garden/Feed/ProposalsList.tsx
+++ b/src/components/Garden/Feed/ProposalsList.tsx
@@ -15,12 +15,11 @@ import {
useViewport,
} from '@1hive/1hive-ui'
-import noProposalsYetLogo from '@assets/noProposalsYet.svg'
import EmptyResults from '../../EmptyResults'
import ProposalCard from './ProposalCard'
import ProposalRankings from './ProposalRankings'
-import filterToggleSvg from '@assets/filter.svg'
+import filterToggleSvg from '@images/icons/base/filter.svg'
import { ProposalType } from '@/types/app'
import AbstainCard from './AbstainCard'
import { ABSTAIN_PROPOSAL } from '../ProposalDetail/ProposalStatus'
@@ -142,7 +141,7 @@ function ProposalsList({
>
) : (
}
+ icon={
}
display="icon"
label="filter"
onClick={onToggle}
diff --git a/src/components/Garden/Feed/WrapToken.js b/src/components/Garden/Feed/WrapToken.js
index 5b8cdabeb..8ec70db70 100644
--- a/src/components/Garden/Feed/WrapToken.js
+++ b/src/components/Garden/Feed/WrapToken.js
@@ -16,14 +16,29 @@ import useUnipoolRewards from '@/hooks/useUnipoolRewards'
import { formatTokenAmount } from '@utils/token-utils'
-import wrappedIcon from '@assets/wrappedIcon.svg'
-import wrappedIconDark from '@assets/dark-mode/wrappedIconDark.svg'
-import unwrappedIcon from '@assets/unwrappedIcon.svg'
-import unwrappedIconDark from '@assets/dark-mode/unwrappedIconDark.svg'
-import claimRewardsIcon from '@assets/rewardsWrapperIcon.svg'
-import claimRewardsIconDark from '@assets/dark-mode/rewardsWrapperIcon.svg'
-import tokenAPRIcon from '@assets/tokenRewardIcon.svg'
-import tokenAPRIconDark from '@assets/dark-mode/tokenRewardIcon.svg'
+// const modeAttributes = { //TODO FIXME
+// wrap: {
+// icon: '/icons/base/unwrappedIcon.svg',
+// button: { mode: 'strong', label: 'Wrap' },
+// },
+// unwrap: {
+// icon: '/icons/base/wrappedIcon.svg',
+// button: { mode: 'strong', label: 'Unwrap' },
+// hint: 'This amount can be used to vote on proposals. It can be unwrapped at any time.',
+// },
+// claim: {
+// button: { mode: 'normal', label: 'Claim' },
+// icon: '/icons/base/rewardsWrapperIcon.svg',
+// },
+// }
+import wrappedIcon from '@images/icons/base/wrappedIcon.svg'
+import wrappedIconDark from '@images/icons/dark-mode/wrappedIconDark.svg'
+import unwrappedIcon from '@images/icons/base/unwrappedIcon.svg'
+import unwrappedIconDark from '@images/icons/dark-mode/unwrappedIconDark.svg'
+import claimRewardsIcon from '@images/icons/base/rewardsWrapperIcon.svg'
+import claimRewardsIconDark from '@images/icons/dark-mode/rewardsWrapperIcon.svg'
+import tokenAPRIcon from '@images/icons/base/tokenRewardIcon.svg'
+import tokenAPRIconDark from '@images/icons/dark-mode/tokenRewardIcon.svg'
function WrapToken({ onClaimRewards, onUnwrapToken, onWrapToken }) {
const { token, wrappableToken } = useGardenState()
diff --git a/src/components/Garden/Filters/CompactFilter.js b/src/components/Garden/Filters/CompactFilter.js
index a362167f3..e2425c345 100644
--- a/src/components/Garden/Filters/CompactFilter.js
+++ b/src/components/Garden/Filters/CompactFilter.js
@@ -1,5 +1,5 @@
import React, { useCallback, useState } from 'react'
-import { animated, Transition } from 'react-spring/renderprops'
+import { animated, Transition } from 'react-spring/renderprops.cjs'
import {
BIG_RADIUS,
DropDown,
@@ -12,7 +12,6 @@ import {
useTheme,
useViewport,
} from '@1hive/1hive-ui'
-import arrowDownSvg from '@assets/arrowDown.svg'
function CompactFilter({ ...props }) {
const { below } = useViewport()
@@ -288,7 +287,7 @@ function AnimatedFilter({ header, items, selected, onSelect }) {
transition: transform 0.3s ease;
`}
>
-
+