Skip to content

Commit

Permalink
review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dohaki committed Nov 8, 2023
1 parent 959a401 commit fba48dc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 50 deletions.
3 changes: 0 additions & 3 deletions src/components/DepositsTable/HeadRow.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import styled from "@emotion/styled";

import { Text } from "components/Text";

import { COLORS } from "utils";

export type HeaderCells = typeof headerCells;

export type ColumnKey = keyof HeaderCells;

export const headerCells = {
Expand Down
28 changes: 14 additions & 14 deletions src/components/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@ import { ReactComponent as ReferrerIcon } from "assets/icons/referrer.svg";
import { ReactComponent as SelfReferralIcon } from "assets/icons/self-referral.svg";
import { ReactComponent as ClockIcon } from "assets/icons/clock.svg";

export type TooltipIcon =
| "green-checkmark"
| "grey-checkmark"
| "referee"
| "referral"
| "self-referral"
| "clock";
const iconMap = {
"green-checkmark": <RoundedCheckmark16 />,
"grey-checkmark": <GreyRoundedCheckmark16 />,
"self-referral": <SelfReferralIcon />,
referral: <ReferrerIcon />,
referee: <RefereeIcon />,
clock: <ClockIcon />,
};

export type TooltipIcon = keyof typeof iconMap;

export interface TooltipProps {
tooltipId?: string;
icon?: TooltipIcon | ReactNode;
Expand All @@ -49,6 +53,8 @@ export const Tooltip: React.FC<TooltipProps> = ({

if (!children) return null;

const iconElement = iconMap[icon as TooltipIcon] || icon;

return (
<>
<StyledAnchor data-tooltip-id={id} data-tooltip-place={placement}>
Expand All @@ -58,13 +64,7 @@ export const Tooltip: React.FC<TooltipProps> = ({
<Wrapper maxWidth={maxWidth}>
{title && (
<TitleRow>
{typeof icon === "object" && icon}
{icon === "green-checkmark" && <RoundedCheckmark16 />}
{icon === "grey-checkmark" && <GreyRoundedCheckmark16 />}
{icon === "self-referral" && <SelfReferralIcon />}
{icon === "referral" && <ReferrerIcon />}
{icon === "referee" && <RefereeIcon />}
{icon === "clock" && <ClockIcon />}
{iconElement}
{title}
{titleSecondary && (
<TitleSecondary>{titleSecondary}</TitleSecondary>
Expand Down
32 changes: 0 additions & 32 deletions src/hooks/useTokenConversion.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import { ReactComponent as BaseGrayscaleLogo } from "assets/grayscale-logos/base
import { Text, Badge } from "components";

import { ChainId, QUERIESV2, COLORS, NoFundsDepositedLogError } from "utils";
import { useElapsedSeconds } from "hooks/useElapsedSeconds";

import { useElapsedSeconds } from "../../../hooks/useElapsedSeconds";
import { useDepositTracking } from "../hooks/useDepositTracking";
import { DepositTimesCard } from "./DepositTimesCard";
import { ElapsedTime } from "./ElapsedTime";
Expand Down

0 comments on commit fba48dc

Please sign in to comment.