react-icons/fi#FiBarChart2 TypeScript Examples
The following examples show how to use
react-icons/fi#FiBarChart2.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.tsx From dxvote with GNU Affero General Public License v3.0 | 4 votes |
Header = observer(() => {
const NavItem = withRouter(
({ route, history, children }: NavItemProps & RouteComponentProps) => {
return (
<div
style={{ cursor: 'pointer' }}
onClick={() => {
history.push(route);
}}
>
{' '}
{children}{' '}
</div>
);
}
);
const {
context: { providerStore, blockchainStore, configStore, daoStore },
} = useContext();
const { active, account } = providerStore.getActiveWeb3React();
const isTestingEnv = !window?.location?.href?.includes('dxvote.eth');
const networkName = configStore.getActiveChainName();
const { userRep, totalSupply } =
active && blockchainStore.initialLoadComplete
? daoStore.getRepAt(account, providerStore.getCurrentBlockNumber())
: { userRep: bnum(0), totalSupply: bnum(0) };
const repPercentage = active
? userRep.times(100).div(totalSupply).toFixed(4)
: bnum(0);
// const votingMachines = configStore.getNetworkContracts().votingMachines;
// const votingMachineTokens = _.uniq(
// Object.keys(votingMachines).map((votingMachineAddress, i) =>
// configStore
// .getTokensOfNetwork()
// .find(
// token => token.address === votingMachines[votingMachineAddress].token
// )
// )
// );
return (
<NavWrapper>
<NavSection>
<NavItem route={`/${networkName}/proposals`}>
<MenuItem>
<img alt="dxdao" src={dxdaoIcon} />
{isTestingEnv && <WarningDev>Testing Environment</WarningDev>}
</MenuItem>
</NavItem>
</NavSection>
{!active ? (
<NavSection>
<Web3ConnectStatus text="Connect Wallet" />
<NavItem route={`/config`}>
<a>
<FiSettings style={{ margin: '0px 10px', color: '#616161' }} />
</a>
</NavItem>
</NavSection>
) : blockchainStore.initialLoadComplete ? (
<NavSection>
{account && active && (
<>
{/* {useBalances(
account
? votingMachineTokens.map(votingMachineToken => ({
assetAddress: votingMachineToken.address,
fromAddress: account,
}))
: []
).map((votingMachineTokenBalance, i) => {
return (
<ItemBox key={i}>
{formatCurrency(
normalizeBalance(votingMachineTokenBalance)
)}{' '}
{votingMachineTokens[i].symbol}{' '}
</ItemBox>
);
})} */}
{repPercentage.toString() !== 'NaN' && (
<ItemBox> {repPercentage.toString()} % REP </ItemBox>
)}
</>
)}
<Web3ConnectStatus text="Connect Wallet" />
<NavItem route={`/${networkName}/info`}>
<a>
<FiBarChart2 style={{ margin: '0px 10px', color: '#616161' }} />
</a>
</NavItem>
<NavItem route={`/config`}>
<a>
<FiSettings style={{ margin: '0px 10px', color: '#616161' }} />
</a>
</NavItem>
{account && (
<NavItem route={`/${networkName}/user/${account}`}>
<a>
<FiUser style={{ margin: '0px 10px', color: '#616161' }} />
</a>
</NavItem>
)}
</NavSection>
) : (
<NavSection>
<Web3ConnectStatus text="Connect Wallet" />
<NavItem route={`/config`}>
<a>
<FiSettings style={{ margin: '0px 10px', color: '#616161' }} />
</a>
</NavItem>
</NavSection>
)}
</NavWrapper>
);
})
Example #2
Source File: achievements.tsx From portfolio with MIT License | 4 votes |
Achievements = () => {
return (
<PageSlideFade>
<Box align="start" mb={6}>
<Header mt={0} mb={0}>
Achievements
</Header>
</Box>
<VStack textAlign="start" align="start" mb={5}>
<Box>
<Heading fontSize="2xl" fontWeight="600" my={5}>
2021
</Heading>
<Box>
<TimelineItem icon={FiUsers}>Became a dad ❤️</TimelineItem>
<TimelineItem icon={FiPackage}>
Published my first post on this website{" "}
<InternalLink color={"blue.200"} url="/blog" text={"Blog"} />
</TimelineItem>
<TimelineItem icon={FiPackage}>
Published or contributed to{" "}
<InternalLink
color={"blue.200"}
url="/open-source"
text={"9 open-source repositories"}
/>
</TimelineItem>
<TimelineItem icon={FiBarChart2}>
Collected 6k+ post views and 350+ total reactions on{" "}
<ExternalLink
color={"blue.200"}
url="https://dev.to/m_ahmad"
text={"Dev.to"}
target="_blank"
/>
</TimelineItem>
<TimelineItem icon={FiHome} skipTrail>
Rebuilt my portfolio website with React, ChakraUI and
Framer-motion,{" "}
<ExternalLink
color={"blue.200"}
url="https://github.com/MA-Ahmad/portfolio"
text={"source on Github"}
target="_blank"
/>
.
</TimelineItem>
</Box>
</Box>
<Box>
<Heading fontSize="2xl" fontWeight="600" my={5}>
2020
</Heading>
<Box>
<TimelineItem icon={FiEdit2}>Wrote 5 blog posts</TimelineItem>
<TimelineItem icon={FiPackage}>
Published or contributed to{" "}
<ExternalLink
color={"blue.200"}
url="https://github.com/MA-Ahmad?tab=repositories"
text={"32 open-source repositories"}
target="_blank"
/>
</TimelineItem>
<TimelineItem icon={FiBarChart2}>
Collected 650+ post views and 15+ total reactions on{" "}
<ExternalLink
color={"blue.200"}
url="https://dev.to/m_ahmad"
text={"Dev.to"}
target="_blank"
/>
</TimelineItem>
<TimelineItem icon={FiHome} skipTrail>
Built my portfolio website with React and ChakraUI,{" "}
<ExternalLink
color={"blue.200"}
url="https://github.com/MA-Ahmad/portfolio2"
text={"source on Github"}
target="_blank"
/>
.
</TimelineItem>
</Box>
</Box>
</VStack>
</PageSlideFade>
);
}