Skip to content

Commit

Permalink
Move MultiElection components to ui components
Browse files Browse the repository at this point in the history
  • Loading branch information
selankon committed Oct 14, 2024
1 parent f95df59 commit 484c277
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 351 deletions.
9 changes: 7 additions & 2 deletions src/components/Process/Aside.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
import { Box, Button, ButtonProps, Card, Flex, FlexProps, Link, Text } from '@chakra-ui/react'
import { ConnectButton } from '@rainbow-me/rainbowkit'
import { environment, SpreadsheetAccess, VoteButton as CVoteButton, VoteWeight } from '@vocdoni/chakra-components'
import {
environment,
MultiElectionVoteButton,

Check failure on line 5 in src/components/Process/Aside.tsx

View workflow job for this annotation

GitHub Actions / build-stg

Module '"@vocdoni/chakra-components"' has no exported member 'MultiElectionVoteButton'.
SpreadsheetAccess,
VoteButton as CVoteButton,
VoteWeight,
} from '@vocdoni/chakra-components'
import { useClient, useElection } from '@vocdoni/react-providers'
import { dotobject, ElectionStatus, formatUnits, PublishedElection } from '@vocdoni/sdk'
import { TFunction } from 'i18next'
import { Trans, useTranslation } from 'react-i18next'
import { Link as ReactRouterLink } from 'react-router-dom'
import { useAccount, useDisconnect } from 'wagmi'
import { CensusMeta } from './Census/CensusType'
import { MultiElectionVoteButton } from '~components/Process/MultiElectionQuestions'

const results = (result: number, decimals?: number) =>
decimals ? parseInt(formatUnits(BigInt(result), decimals), 10) : result
Expand Down
10 changes: 7 additions & 3 deletions src/components/Process/Chained.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import { Box, Progress } from '@chakra-ui/react'
import { ConnectButton } from '@rainbow-me/rainbowkit'
import { ElectionQuestions, ElectionResults, SpreadsheetAccess } from '@vocdoni/chakra-components'
import {
ElectionQuestions,
ElectionResults,
MultiElectionQuestionsForm,

Check failure on line 6 in src/components/Process/Chained.tsx

View workflow job for this annotation

GitHub Actions / build-stg

'"@vocdoni/chakra-components"' has no exported member named 'MultiElectionQuestionsForm'. Did you mean 'ElectionQuestionsForm'?
MultiElectionsProvider,

Check failure on line 7 in src/components/Process/Chained.tsx

View workflow job for this annotation

GitHub Actions / build-stg

Module '"@vocdoni/chakra-components"' has no exported member 'MultiElectionsProvider'.
SpreadsheetAccess,
} from '@vocdoni/chakra-components'
import { ElectionProvider, useElection } from '@vocdoni/react-providers'
import { InvalidElection, IVotePackage, PublishedElection, VocdoniSDKClient } from '@vocdoni/sdk'
import { PropsWithChildren, useEffect, useState } from 'react'
Expand All @@ -9,8 +15,6 @@ import { VoteButton } from '~components/Process/Aside'
import BlindCSPConnect from '~components/Process/BlindCSPConnect'
import { ChainedProvider, useChainedProcesses } from './ChainedContext'
import { ConfirmVoteModal } from './ConfirmVoteModal'
import { MultiElectionQuestionsForm } from '~components/Process/MultiElectionQuestions'
import { MultiElectionsProvider } from '~components/Process/MultiElectionContext'

type ChainedProcessesInnerProps = {
connected: boolean
Expand Down
87 changes: 0 additions & 87 deletions src/components/Process/MultiElectionConfirmation.tsx

This file was deleted.

126 changes: 0 additions & 126 deletions src/components/Process/MultiElectionContext.tsx

This file was deleted.

133 changes: 0 additions & 133 deletions src/components/Process/MultiElectionQuestions.tsx

This file was deleted.

0 comments on commit 484c277

Please sign in to comment.