Skip to content

Commit

Permalink
refactor: temporary remove metamask
Browse files Browse the repository at this point in the history
  • Loading branch information
geolffreym committed Jan 1, 2025
1 parent ebbf463 commit c6872ea
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/pages/dashboard/finance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Header from "@src/layouts/dashboard/header.tsx";
import HeaderContent from "@src/layouts/dashboard/header-content.tsx";
import withAuth from '@src/components/should-login/withAuth';

const OverviewBankingViewWithAuth = withAuth(OverviewBankingView, 'iconoir:stats-report', 'Log in to access your balance, transfers, and more.');
const OverviewBankingViewWithAuth = withAuth(OverviewBankingView, 'iconoir:stats-report', 'Login to access your balance.');

export default function OverviewBankingPage() {
return (
Expand Down
26 changes: 13 additions & 13 deletions src/sections/finance/components/finance-contacts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import { useRouter } from '@src/routes/hooks';

// lens
import { Profile } from '@lens-protocol/api-bindings';
import {useDispatch} from "react-redux";
import {storeAddress, toggleRainbow} from '@redux/address';
import { useDispatch } from "react-redux";
import { storeAddress, toggleRainbow } from '@redux/address';
import React from "react";

// ----------------------------------------------------------------------
Expand All @@ -33,20 +33,20 @@ interface Props extends CardProps {
}

export default function FinanceContactsCarousel({
title,
subheader,
list,
chunkSize = 5,
...other
}: Props) {
title,
subheader,
list,
chunkSize = 5,
...other
}: Props) {
const router = useRouter();
const dispatch = useDispatch();


function scrollToSmoothly(pos: number, time: number) {
let currentPos = window.scrollY;
let start:number |null = null;
if(time == null) time = 500;
let start: number | null = null;
if (time == null) time = 500;
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
pos = +pos, time = +time;
window.requestAnimationFrame(function step(currentTime) {
Expand All @@ -67,13 +67,13 @@ export default function FinanceContactsCarousel({

const handleClick = (address: string, profileId: string) => {
dispatch(toggleRainbow());
dispatch(storeAddress({address, profileId}));
dispatch(storeAddress({ address, profileId }));

// Scroll to top the window with a smooth animation
scrollToSmoothly(0, 1000)
setTimeout(() => {
dispatch(toggleRainbow());
},1400)
}, 1400)
}

const goToProfile = (id: string) => {
Expand Down Expand Up @@ -130,7 +130,7 @@ type SlideContactsProps = {
onClickArrow: (address: string, profileId: string) => void;
};

function SlideContacts({ chunk, goToProfile, onClickArrow}: SlideContactsProps) {
function SlideContacts({ chunk, goToProfile, onClickArrow }: SlideContactsProps) {
const handleArrowClick = (event: React.MouseEvent<HTMLButtonElement>, address: string, profileId: string) => {
event.stopPropagation();
onClickArrow(address, profileId);
Expand Down
3 changes: 2 additions & 1 deletion src/sections/finance/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default function OverviewBankingView() {
}}
/>

<FinanceQuickActions />
{/* <FinanceQuickActions /> */}
</Stack>

<Grid xs={12} md={8}>
Expand All @@ -100,6 +100,7 @@ export default function OverviewBankingView() {
{following?.length ? (
<FinanceContacts
title="Contacts"
chunkSize={3}
subheader={`You have ${following?.length ?? 0} contacts`}
list={following ?? []}
/>
Expand Down

0 comments on commit c6872ea

Please sign in to comment.