Skip to content
This repository has been archived by the owner on Nov 28, 2024. It is now read-only.

Commit

Permalink
Remove useless change
Browse files Browse the repository at this point in the history
  • Loading branch information
Gege Li authored and Gege Li committed Aug 13, 2024
1 parent d4bbed9 commit 981f634
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 77 deletions.
7 changes: 1 addition & 6 deletions src/components/loading/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,4 @@
transform: scale(0.5);
opacity: 0.3;
}
}

.absolute-popover-container > [data-radix-popper-content-wrapper] {
position: absolute !important;
pointer-events: all;
}
}
2 changes: 1 addition & 1 deletion src/components/migrate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ const Migrate = ({ onTransactionActiveChange }: ActionProps) => {

}

export default Migrate;
export default Migrate;
60 changes: 7 additions & 53 deletions src/components/ui/popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,75 +3,29 @@ import { useState } from 'react';
import { Button } from './button';
import { cn } from '@/lib/utils';

const title = "We are migrating";
const instruction = "Please migrate to new KTON Pool and get your gKTON reward. To migrate, please follow steps below:"
const stepContents = [`Step 1:Click \"Unstake\" button to unstake your KTON`, `Step 2:Click \"Stake in new pool\" button to stake your KTON`];
const buttonText = "Start Migration";

export default function CenteredPopover() {
const [open, setOpen] = useState(true);

return (
open && <div className="absolute h-[360px] w-[480px] flex justify-center items-center rounded-[20px] bg-[#242A2E]">
<div className='h-full w-full px-[20px] font-mono'>
<h1 className='text-center font-bold py-[15px]'>We are migrating</h1>
<h1 className='text-center font-bold py-[15px]'>{title}</h1>
<div className='h-[1px] bg-[rgba(255,255,255,0.1)]'></div>
<div className='py-[20px] tracking-tight'>
<p className='text-sm py-[10px]'>Please migrate to new KTON Pool and get your <a>gKTON</a> reward. To migrate, please follow steps below:</p>
<p className='text-sm py-[10px]'>{instruction}</p>
{stepContents.map((content, index) => {
return <p className='text-center text-sm py-[10px] bg-[rgba(18,22,25)] mb-[10px]' key={index}>{content}</p>
})}
</div>
<Button
onClick={() => setOpen(false)}
type="submit"
<Button onClick={() => setOpen(false)} type="submit"
className={cn('mt-5 w-full rounded-[0.3125rem] text-[0.875rem] text-white')}
>Start Migration
</Button>
>{buttonText}</Button>
</div>

</div>
);
// <div className="absolute-popover-container"
// // style={{
// // height: '100vh',
// // display: 'flex',
// // justifyContent: 'center',
// // alignItems: 'center',
// // position: 'absolute',
// // left: '50%'
// // }}
// >
// <Popover.Root open={open}>
// <Popover.Portal >
// <Popover.Content
// sideOffset={5}
// style={{
// padding: '16px',
// backgroundColor: 'white',
// borderRadius: '4px',
// boxShadow: '0px 4px 16px rgba(0, 0, 0, 0.1)',
// position: 'absolute',
// zIndex: 1000, // Ensure the popover is on top
// top: '50%',
// left: '50%',
// transform: 'translate(-50%, -50%)',
// minWidth: '400px',
// minHeight: '300px',
// textAlign: 'center',
// }}
// >
// <div>
// <p>Please migrate to new Kton Pool and get your <a>gKton</a> reward.</p>
// <p>To migrate, please follow steps below: </p>
// <p>Step 1: Click WithDraw button to unstake your Kton</p>
// <p>Step 2: Click Stake in new Pool button to stake your Kton</p>
// </div>
// <button onClick={()=>setOpen(false)} style={{ padding: '8px 16px', cursor: 'pointer', position: 'relative' }}>
// Start Migration
// </button>

// <Popover.Arrow style={{ fill: 'white' }} />
// </Popover.Content>
// </Popover.Portal>
// </Popover.Root>
// </div>
// );
}
16 changes: 0 additions & 16 deletions src/hooks/useInstructionToast.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/hooks/useMigrateState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useMemo } from "react";
export type UseMigrateStateType = {
isConnected: boolean;
isSupportedChainId: boolean;
isMigrating: boolean; //isMigrating
isMigrating: boolean;
isTransactionConfirming: boolean;
isLoadingOrRefetching: boolean;
value: bigint;
Expand Down

0 comments on commit 981f634

Please sign in to comment.