Skip to content

Commit

Permalink
chore: remove old hook
Browse files Browse the repository at this point in the history
  • Loading branch information
martines3000 committed Nov 26, 2024
1 parent 4c85fdf commit fd68e91
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 106 deletions.
45 changes: 0 additions & 45 deletions apps/frontend/src/components/Navbar/Points.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
} from '@/components/ui/popover';
import { useUser } from '@/hooks';
import { useFuelPoints } from '@/hooks/useFuelPoints';
import { useSwayPoints } from '@/hooks/useSwaylendPoints';
import { cn } from '@/lib/utils';
import { useIsConnected } from '@fuels/react';
import { Trophy } from 'lucide-react';
Expand All @@ -22,24 +21,12 @@ export const Points = () => {
const isHover = useHover(hoverRef);

const [isManualOpen, setIsManualOpen] = useState(false);
// const setOpen = useReferralModalStore(selectReferralModalSetOpen);

const { data: user } = useUser();

// const [isCopied, setIsCopied] = useState(false);

const { isConnected } = useIsConnected();

const { data: fuelPoints } = useFuelPoints();
const { data: swaylendPoints } = useSwayPoints();

// const handleCopy = async (value: string) => {
// setIsCopied(true);
// await navigator.clipboard.writeText(value);
// setTimeout(() => {
// setIsCopied(false);
// }, 1000);
// };

return (
<Popover open={isHover || isManualOpen}>
Expand All @@ -48,9 +35,6 @@ export const Points = () => {
ref={hoverRef}
onClick={() => setIsManualOpen(true)}
>
{/* <div className="text-yellow-400 sm:px-3 sm:py-1.5 max-sm:p-1 flex items-center gap-x-1 rounded-full border-[3px] border-yellow-400">
<span className="max-sm:hidden">Coming Soon</span>
</div> */}
<Image alt="points-icon" width={40} height={40} src={POINTS} />
</PopoverTrigger>
<PopoverContent
Expand Down Expand Up @@ -81,35 +65,6 @@ export const Points = () => {
Points Leaderboard
</Button>
</Link>
{/* <div className="w-full">
<Button
className={cn('w-full flex gap-x-2', isLoading && 'animate-pulse')}
variant="tertiary-card"
disabled={isPending}
onMouseDown={async () => {
if (isError || !user) return await refetch();
await handleCopy(user.inviteCode);
}}
>
{!isLoading && !isError && (
<>
<Copy className="w-5 h-5" />
{isCopied ? 'Copied' : 'Copy referral code'}
</>
)}
{isLoading && <Loader className="w-5 h-5 animate-spin" />}
{!isPending && isError && 'Refresh'}
</Button>
{user?.redeemedInviteCode === false && (
<Button
className="w-full flex gap-x-2 mt-2"
variant="tertiary-card"
onMouseDown={() => setOpen(true)}
>
Redeem referral code
</Button>
)}
</div> */}
</PopoverContent>
</Popover>
);
Expand Down
61 changes: 0 additions & 61 deletions apps/frontend/src/hooks/useSwaylendPoints.ts

This file was deleted.

0 comments on commit fd68e91

Please sign in to comment.