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

Hotfix text issue #18

Merged
merged 15 commits into from
Apr 17, 2024
7 changes: 6 additions & 1 deletion src/components/common/FooterIconLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ export const IconLink: React.FC<IconLinkProps> = ({ IconComponent, href, classNa
} ${className || ''}`;

return (
<div className={divClass} onClick={handleClick} onMouseLeave={handleMouseLeave} style={{minWidth:'40px',minHeight:"40px"}}>
<div
className={divClass}
onClick={handleClick}
onMouseLeave={handleMouseLeave}
style={{ minWidth: '40px', minHeight: '40px' }}
>
<IconComponent />
</div>
);
Expand Down
6 changes: 1 addition & 5 deletions src/components/common/FooterLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ export const FooterLink: React.FC<FooterLinkProps> = ({ children, href }) => {
}`;

return (
<div
className={divClass}
onClick={handleClick}
onMouseLeave={handleMouseLeave}
>
<div className={divClass} onClick={handleClick} onMouseLeave={handleMouseLeave}>
{children}
</div>
);
Expand Down
2,315 changes: 2,315 additions & 0 deletions src/components/icon/Team.tsx

Large diffs are not rendered by default.

901 changes: 869 additions & 32 deletions src/components/layoutIcon/Icon.tsx

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/hooks/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export interface Token {
price: string;
volume24h: string;
tvl: string;
token_id: string;
}

export interface TokenBaseInfo {
Expand Down
5 changes: 4 additions & 1 deletion src/pages/home/SDKIntro/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ export const SDKIntro = () => {
<div className="lg:hidden md:hidden">
<CodeBlockMobile />
</div>
<div className="sm:hidden lg:hidden mb-80 absolute md:scale-x-110 top-44 left-1/2 transform -translate-x-1/2 mx-auto" style={{width:'556px'}}>
<div
className="sm:hidden lg:hidden mb-80 absolute md:scale-x-110 top-44 left-1/2 transform -translate-x-1/2 mx-auto"
style={{ width: '556px' }}
>
<CodeBlock />
</div>
<div className="flex flex-col px-10 w-full items-center lg:hidden md:flex-row md:mt-96 md:space-x-4 md:justify-center">
Expand Down
2 changes: 2 additions & 0 deletions src/pages/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Dcl from './v3/Dcl';
import Overview from './v3/Overview';
import Team from './v3/Team';
import Footer from './v3/Footer';
import Partners from './v3/Partners';

const HomePage = () => {
const mobile = isMobile();
Expand All @@ -27,6 +28,7 @@ const HomePage = () => {
<Data />
<SDKIntro />
<Investors />
<Partners />
<Team />
</section>
</div>
Expand Down
4 changes: 3 additions & 1 deletion src/pages/home/v2/Banner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ const Banner = () => {
)}
</span>
<span className="text-white text-base md:hidden">Accumulative Trading Volume</span>
<span className="text-white text-base text-center sm:hidden lg:hidden">Accumulative <br></br>Trading Volume</span>
<span className="text-white text-base text-center sm:hidden lg:hidden">
Accumulative <br></br>Trading Volume
</span>
</div>
</div>
</div>
Expand Down
16 changes: 8 additions & 8 deletions src/pages/home/v2/Data/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from 'react';
import { useTokenList, Token, useTokenBaeInfoList, TokenBaseInfo } from '~src/hooks/home';
import { getNearIcon } from '~src/components/layoutIcon/Icon';
import icons from '~src/utils/metadata';

import { toInternationalCurrencySystem } from '~src/utils/numbers';
const Data = () => {
Expand Down Expand Up @@ -56,19 +56,15 @@ const Data = () => {
};

function TokenBox({ token, symbolMap }: { token: Token; symbolMap: any }) {
const { symbol, icon, amount, tvl } = token;
const nearIcon = getNearIcon();
const { symbol, icon, amount, tvl } = processToken(token);
return (
<>
<div
className="rounded-2xl px-3.5 py-4 text-white bg-blueColor hover:bg-brightGreenColor sm:hidden"
style={{ backdropFilter: 'blur(10px)', WebkitBackdropFilter: 'blur(10px)' }}
>
<div className="flex items-center">
<img
src={symbol == 'wNEAR' ? nearIcon : icon || symbolMap[symbol]}
className="w-10 h-10 rounded-full border-4 border-darkBorderColor"
></img>
<img src={icon || symbolMap[symbol]} className="w-10 h-10 rounded-full border-4 border-darkBorderColor"></img>
<span className="text-lg ml-2.5 font-extrabold">{symbol == 'wNEAR' ? 'NEAR' : symbol}</span>
</div>
<div className="flex items-center justify-between mt-6">
Expand All @@ -88,7 +84,7 @@ function TokenBox({ token, symbolMap }: { token: Token; symbolMap: any }) {
>
<div className="relative flex flex-col items-start w-36">
<img
src={symbol == 'wNEAR' ? nearIcon : icon || symbolMap[symbol]}
src={icon || symbolMap[symbol]}
className="absolute -top-12 w-10 h-10 rounded-full border-4 border-darkBorderColor transform translate-x-2"
></img>
<span className="text-lg ml-2.5 font-extrabold">{symbol == 'wNEAR' ? 'NEAR' : symbol}</span>
Expand All @@ -105,5 +101,9 @@ function TokenBox({ token, symbolMap }: { token: Token; symbolMap: any }) {
</>
);
}
function processToken(token: Token) {
token.icon = icons[token.token_id] || token.icon;
return token;
}

export default Data;
6 changes: 3 additions & 3 deletions src/pages/home/v2/Footer/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.footer-link{
@apply text-white text-sm mr-14 cursor-pointer sm:mr-0 md:mr-0 transition-colors hover:text-primary hover:underline;
}
.footer-link {
@apply text-white text-sm mr-14 cursor-pointer sm:mr-0 md:mr-0 transition-colors hover:text-primary hover:underline;
}
2 changes: 1 addition & 1 deletion src/pages/home/v2/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const Footer = () => {
function goForum() {
window.open('https://gov.ref.finance/');
}
function goSecurity(){
function goSecurity() {
window.open('https://guide.ref.finance/developers/audits');
}
function goBusinessInquiries() {
Expand Down
4 changes: 1 addition & 3 deletions src/pages/home/v2/Investors/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ const Investors = () => {
return (
<div className="relative mx-auto sm:mt-20 md:mt-28 mt-56 lg:w-4/5 sm:w-full md:w-full md:mb-64">
<div className="flex justify-center text-white gotham_font_bold text-2xl">INVESTORS</div>
<div
className="flex justify-center text-42 text-white mt-3 gotham_font_light sm:text-center md:text-center text-opacity-50 sm:mt-0 md:mt-0 sm:text-32"
>
<div className="flex justify-center text-42 text-white mt-3 gotham_font_light sm:text-center md:text-center text-opacity-50 sm:mt-0 md:mt-0 sm:text-32">
Trusted by the best
</div>
<div className="flex flex-col justify-center items-center">
Expand Down
12 changes: 10 additions & 2 deletions src/pages/home/v3/Dcl/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import React from 'react';
import { BannerArrowIcon, DclIcon1, DclIcon19, DclIcon2, DclIcon3, DclIcon4, DclIcon5 } from '~src/components/layoutIcon/Icon';
import {
BannerArrowIcon,
DclIcon1,
DclIcon19,
DclIcon2,
DclIcon3,
DclIcon4,
DclIcon5
} from '~src/components/layoutIcon/Icon';

type FeatureCardProps = {
Icon: React.ElementType;
Expand Down Expand Up @@ -45,7 +53,7 @@ const Dcl = () => {
<div className="absolute top-16 transform translate-x-1/2 -translate-y-1/2 md:left-0 md:top-16">
<DclIcon2 />
</div>
<div className='lg:hidden md:hidden absolute left-0 -top-44 right-0 z-0'>
<div className="lg:hidden md:hidden absolute left-0 -top-44 right-0 z-0">
<DclIcon19 />
</div>
<div className="relative z-10 flex flex-wrap gap-14 justify-between items-baseline text-white mb-24 grid grid-cols-3 sm:grid-cols-1 sm:pl-4 sm:pr-4 sm:mb-0 md:px-6 md:mb-24 md:gap-6">
Expand Down
6 changes: 3 additions & 3 deletions src/pages/home/v3/Footer/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.footer-link{
@apply text-white text-sm mr-14 cursor-pointer sm:mr-0 md:mr-0 transition-colors hover:text-primary hover:underline;
}
.footer-link {
@apply text-white text-sm mr-14 cursor-pointer sm:mr-0 md:mr-0 transition-colors hover:text-primary hover:underline;
}
8 changes: 6 additions & 2 deletions src/pages/home/v3/Overview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@ const Overview = () => {
</div>
</div>
<div className="text-white ml-7 sm:ml-0 sm:text-center md:mr-7">
<h1 className="text-46 gotham_font_bold whitespace-nowrap mb-2.5 sm:text-4xl sm:mb-3 md:text-4xl md:text-center xs:text-2xl">Portfolio-Overview</h1>
<p className="text-26 mb-16 sm:text-2xl sm:mb-3 md:mb-0 md:text-2xl">Overview of your invests and assets</p>
<h1 className="text-46 gotham_font_bold whitespace-nowrap mb-2.5 sm:text-4xl sm:mb-3 md:text-4xl md:text-center xs:text-2xl">
Portfolio-Overview
</h1>
<p className="text-26 mb-16 sm:text-2xl sm:mb-3 md:mb-0 md:text-2xl">
Overview of your investments and assets
</p>
<p className="flex items-center text-lg sm:text-base md:hidden">
Composed by
<div className="ml-2 mr-2">
Expand Down
Loading
Loading