Skip to content

Commit

Permalink
feat: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
BLuEScioN committed Sep 18, 2024
1 parent 0978c51 commit 967fd00
Show file tree
Hide file tree
Showing 14 changed files with 55 additions and 52 deletions.
8 changes: 4 additions & 4 deletions src/app/stacking/CustomTable.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { mobileBorderCss } from '@/common/constants/constants';
import { Box } from '@/ui/Box';
import { Icon } from '@/ui/Icon';
import { Table } from '@/ui/Table';
import { useColorModeValue } from '@chakra-ui/react';
import styled from '@emotion/styled';
import { ArrowDown, ArrowUp, ArrowsDownUp } from '@phosphor-icons/react';
import React, { Suspense } from 'react';

Check warning on line 4 in src/app/stacking/CustomTable.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/CustomTable.tsx#L1-L4

Added lines #L1 - L4 were not covered by tests

import { Section } from '../../common/components/Section';
import { mobileBorderCss } from '../../common/constants/constants';
import { Box } from '../../ui/Box';
import { Flex } from '../../ui/Flex';
import { Icon } from '../../ui/Icon';
import { Table } from '../../ui/Table';
import { Tbody } from '../../ui/Tbody';
import { Td } from '../../ui/Td';
import { Text } from '../../ui/Text';
Expand Down
7 changes: 4 additions & 3 deletions src/app/stacking/CycleInformation.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Flex } from '@/ui/Flex';
import { Icon } from '@/ui/Icon';
import { Text } from '@/ui/Text';
import { VStack } from '@chakra-ui/react';
import { ArrowRight } from '@phosphor-icons/react';

Check warning on line 2 in src/app/stacking/CycleInformation.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/CycleInformation.tsx#L1-L2

Added lines #L1 - L2 were not covered by tests

import { Flex } from '../../ui/Flex';
import { Icon } from '../../ui/Icon';
import { Text } from '../../ui/Text';

Check warning on line 6 in src/app/stacking/CycleInformation.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/CycleInformation.tsx#L4-L6

Added lines #L4 - L6 were not covered by tests

// Current Cycle Component
export const CycleInformation = ({

Check warning on line 9 in src/app/stacking/CycleInformation.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/CycleInformation.tsx#L9

Added line #L9 was not covered by tests
name = 'Current cycle',
Expand Down
9 changes: 5 additions & 4 deletions src/app/stacking/FAQ.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Flex } from '@/ui/Flex';
import { Icon } from '@/ui/Icon';
import { Stack } from '@/ui/Stack';
import { Text } from '@/ui/Text';
import { Plus } from '@phosphor-icons/react';

Check warning on line 1 in src/app/stacking/FAQ.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/FAQ.tsx#L1

Added line #L1 was not covered by tests

import { Flex } from '../../ui/Flex';
import { Icon } from '../../ui/Icon';
import { Stack } from '../../ui/Stack';
import { Text } from '../../ui/Text';

Check warning on line 6 in src/app/stacking/FAQ.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/FAQ.tsx#L3-L6

Added lines #L3 - L6 were not covered by tests

export function FAQ() {

Check warning on line 8 in src/app/stacking/FAQ.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/FAQ.tsx#L8

Added line #L8 was not covered by tests
return (
<Stack gap={1}>
Expand Down
10 changes: 5 additions & 5 deletions src/app/stacking/HorizontalPoxCycleDiagram.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Box } from '@/ui/Box';
import { Flex } from '@/ui/Flex';
import { Grid } from '@/ui/Grid';
import { Stack } from '@/ui/Stack';
import { Text } from '@/ui/Text';
import { useEffect, useRef, useState } from 'react';

Check warning on line 1 in src/app/stacking/HorizontalPoxCycleDiagram.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/HorizontalPoxCycleDiagram.tsx#L1

Added line #L1 was not covered by tests

import { Box } from '../../ui/Box';
import { Flex } from '../../ui/Flex';
import { Grid } from '../../ui/Grid';
import { Stack } from '../../ui/Stack';
import { Text } from '../../ui/Text';
import { CycleInformation } from './CycleInformation';

Check warning on line 8 in src/app/stacking/HorizontalPoxCycleDiagram.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/HorizontalPoxCycleDiagram.tsx#L3-L8

Added lines #L3 - L8 were not covered by tests
import { PoxCycleInfo } from './usePoxCycle';

Expand Down
10 changes: 5 additions & 5 deletions src/app/stacking/MetricCards.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Card } from '@/common/components/Card';
import { Flex } from '@/ui/Flex';
import { Grid } from '@/ui/Grid';
import { Icon } from '@/ui/Icon';
import { Text } from '@/ui/Text';
import { Info } from '@phosphor-icons/react';

Check warning on line 1 in src/app/stacking/MetricCards.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/MetricCards.tsx#L1

Added line #L1 was not covered by tests

import { Card } from '../../common/components/Card';
import { Flex } from '../../ui/Flex';
import { Icon } from '../../ui/Icon';
import { Text } from '../../ui/Text';

Check warning on line 6 in src/app/stacking/MetricCards.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/MetricCards.tsx#L3-L6

Added lines #L3 - L6 were not covered by tests

const MetricCard = ({

Check warning on line 8 in src/app/stacking/MetricCards.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/MetricCards.tsx#L8

Added line #L8 was not covered by tests
title,
primaryMetric,
Expand Down
5 changes: 3 additions & 2 deletions src/app/stacking/PaginationControls.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Box } from '@/ui/Box';
import { Input } from '@/ui/Input';
import { Button, Flex, Icon, Text } from '@chakra-ui/react';
import { CaretDoubleLeft, CaretDoubleRight, CaretLeft, CaretRight } from '@phosphor-icons/react';
import React, { useState } from 'react';

Check warning on line 3 in src/app/stacking/PaginationControls.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/PaginationControls.tsx#L1-L3

Added lines #L1 - L3 were not covered by tests

import { Box } from '../../ui/Box';
import { Input } from '../../ui/Input';

Check warning on line 6 in src/app/stacking/PaginationControls.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/PaginationControls.tsx#L5-L6

Added lines #L5 - L6 were not covered by tests

interface PaginationControlProps {
currentPage: number;
totalPages: number;
Expand Down
3 changes: 1 addition & 2 deletions src/app/stacking/PoxCycleDiagram.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useBreakpointValue } from '@/ui/hooks/useBreakpointValue';

import { useBreakpointValue } from '../../ui/hooks/useBreakpointValue';
import { HorizontalPoxCycleDiagram } from './HorizontalPoxCycleDiagram';
import { VerticalPoxCycleDiagram } from './VerticalPoxCycleDiagram';
import { usePoxCycle } from './usePoxCycle';

Check warning on line 4 in src/app/stacking/PoxCycleDiagram.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/PoxCycleDiagram.tsx#L1-L4

Added lines #L1 - L4 were not covered by tests
Expand Down
10 changes: 5 additions & 5 deletions src/app/stacking/PreviousCyclesTable.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Flex } from '@/ui/Flex';
import { Icon } from '@/ui/Icon';
import { Text } from '@/ui/Text';
import BitcoinIcon from '@/ui/icons/BitcoinIcon';
import StxIcon from '@/ui/icons/StxIcon';
import { useCallback, useMemo, useState } from 'react';

Check warning on line 1 in src/app/stacking/PreviousCyclesTable.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/PreviousCyclesTable.tsx#L1

Added line #L1 was not covered by tests

import { Flex } from '../../ui/Flex';
import { Icon } from '../../ui/Icon';
import { Text } from '../../ui/Text';
import BitcoinIcon from '../../ui/icons/BitcoinIcon';
import StxIcon from '../../ui/icons/StxIcon';

Check warning on line 7 in src/app/stacking/PreviousCyclesTable.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/PreviousCyclesTable.tsx#L3-L7

Added lines #L3 - L7 were not covered by tests
import { ColumnDefinition } from './CustomTable';
import { CustomTableWithCursorPagination } from './CustomTableWithCursorPagination';

Check warning on line 9 in src/app/stacking/PreviousCyclesTable.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/PreviousCyclesTable.tsx#L9

Added line #L9 was not covered by tests

Expand Down
7 changes: 4 additions & 3 deletions src/app/stacking/PriceTag.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Box } from '@/ui/Box';
import BitcoinLogo from '@/ui/icons/BitcoinLogo';
import StxIcon from '@/ui/icons/StxIcon';
import { Flex, Text } from '@chakra-ui/react';

Check warning on line 1 in src/app/stacking/PriceTag.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/PriceTag.tsx#L1

Added line #L1 was not covered by tests

import { Box } from '../../ui/Box';
import BitcoinLogo from '../../ui/icons/BitcoinLogo';
import StxIcon from '../../ui/icons/StxIcon';

Check warning on line 5 in src/app/stacking/PriceTag.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/PriceTag.tsx#L3-L5

Added lines #L3 - L5 were not covered by tests

export type PriceTagToken = 'btc' | 'stx';

export function PriceTag({ price, token }: { price: number; token: PriceTagToken }) {

Check warning on line 9 in src/app/stacking/PriceTag.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/PriceTag.tsx#L9

Added line #L9 was not covered by tests
Expand Down
20 changes: 10 additions & 10 deletions src/app/stacking/StackersEarnings.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Card } from '@/common/components/Card';
import { Box } from '@/ui/Box';
import { Flex } from '@/ui/Flex';
import { Stack } from '@/ui/Stack';
import { Tab } from '@/ui/Tab';
import { TabList } from '@/ui/TabList';
import { TabPanel } from '@/ui/TabPanel';
import { TabPanels } from '@/ui/TabPanels';
import { Tabs } from '@/ui/Tabs';
import { Text } from '@/ui/Text';
import { Card } from '../../common/components/Card';
import { Box } from '../../ui/Box';
import { Flex } from '../../ui/Flex';
import { Stack } from '../../ui/Stack';
import { Tab } from '../../ui/Tab';
import { TabList } from '../../ui/TabList';
import { TabPanel } from '../../ui/TabPanel';
import { TabPanels } from '../../ui/TabPanels';
import { Tabs } from '../../ui/Tabs';
import { Text } from '../../ui/Text';

Check warning on line 10 in src/app/stacking/StackersEarnings.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/StackersEarnings.tsx#L1-L10

Added lines #L1 - L10 were not covered by tests

function CustomTab({ children }: { children: React.ReactNode }) {

Check warning on line 12 in src/app/stacking/StackersEarnings.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/StackersEarnings.tsx#L12

Added line #L12 was not covered by tests
return (
Expand Down
8 changes: 4 additions & 4 deletions src/app/stacking/VerticalPoxCycleDiagram.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Box } from '@/ui/Box';
import { Flex } from '@/ui/Flex';
import { Stack } from '@/ui/Stack';
import { Text } from '@/ui/Text';
import { useEffect, useRef, useState } from 'react';

Check warning on line 1 in src/app/stacking/VerticalPoxCycleDiagram.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/VerticalPoxCycleDiagram.tsx#L1

Added line #L1 was not covered by tests

import { Box } from '../../ui/Box';
import { Flex } from '../../ui/Flex';
import { Stack } from '../../ui/Stack';
import { Text } from '../../ui/Text';
import { CycleInformation } from './CycleInformation';

Check warning on line 7 in src/app/stacking/VerticalPoxCycleDiagram.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/VerticalPoxCycleDiagram.tsx#L3-L7

Added lines #L3 - L7 were not covered by tests
import { PoxCycleInfo } from './usePoxCycle';

Expand Down
2 changes: 1 addition & 1 deletion src/app/stacking/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box } from '@/ui/Box';
import dynamic from 'next/dynamic';

Check warning on line 1 in src/app/stacking/page.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/page.tsx#L1

Added line #L1 was not covered by tests

import { Box } from '../../ui/Box';
import { getTokenPrice } from '../getTokenPriceInfo';

Check warning on line 4 in src/app/stacking/page.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/page.tsx#L3-L4

Added lines #L3 - L4 were not covered by tests

const Page = dynamic(() => import('./PageClient'), {

Check warning on line 6 in src/app/stacking/page.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/page.tsx#L6

Added line #L6 was not covered by tests
Expand Down
6 changes: 3 additions & 3 deletions src/app/stacking/usePoxCycle.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NUM_SECONDS_IN_TEN_MINUTES } from '@/common/constants/constants';
import { useBlockByHeight } from '@/common/queries/useBlockByHeight';
import { useSuspensePoxInfoRaw } from '@/common/queries/usePoxInforRaw';
import { NUM_SECONDS_IN_TEN_MINUTES } from '../../common/constants/constants';
import { useBlockByHeight } from '../../common/queries/useBlockByHeight';
import { useSuspensePoxInfoRaw } from '../../common/queries/usePoxInforRaw';

Check warning on line 3 in src/app/stacking/usePoxCycle.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/usePoxCycle.tsx#L1-L3

Added lines #L1 - L3 were not covered by tests

export interface PoxCycleInfo {
currentBurnChainBlockHeight: number;
Expand Down
2 changes: 1 addition & 1 deletion src/app/stacking/withCursorPagination.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Stack } from '@/ui/Stack';
import React, { useEffect, useState } from 'react';

Check warning on line 1 in src/app/stacking/withCursorPagination.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/withCursorPagination.tsx#L1

Added line #L1 was not covered by tests

import { Stack } from '../../ui/Stack';

Check warning on line 3 in src/app/stacking/withCursorPagination.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/withCursorPagination.tsx#L3

Added line #L3 was not covered by tests
import { CustomTableProps } from './CustomTable';
import { PaginationControl } from './PaginationControls';

Check warning on line 5 in src/app/stacking/withCursorPagination.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/stacking/withCursorPagination.tsx#L5

Added line #L5 was not covered by tests

Expand Down

0 comments on commit 967fd00

Please sign in to comment.