Skip to content

Commit

Permalink
Fix routes
Browse files Browse the repository at this point in the history
  • Loading branch information
selankon committed Aug 9, 2024
1 parent a5e3098 commit bb817aa
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
26 changes: 13 additions & 13 deletions src/components/Envelope/Detail.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import voteImage from '/images/vocdoni-vote.png'
import {Flex, Image, Link, Tab, TabList, TabPanel, TabPanels, Text} from '@chakra-ui/react'
import {IVoteInfoResponse, PublishedElection} from '@vocdoni/sdk'
import {formatDistance} from 'date-fns'
import {Trans, useTranslation} from 'react-i18next'
import {generatePath, Link as RouterLink} from 'react-router-dom'
import {CopyButton, ReducedTextAndCopy} from '~components/Layout/CopyButton'
import {RawContentBox} from '~components/Layout/ShowRawButton'
import {RoutePath} from '~constants'
import {RouteParamsTabs} from '~components/Layout/RouteParamsTabs'
import {DetailsGrid, GridItemProps} from '~components/Layout/DetailsGrid'
import {processIdGridItem} from '~components/Transactions/TxDetails/SpecificTxDetails'
import {Envelope, VotePackageType} from '@vocdoni/chakra-components'
import {ElectionProvider, useElection} from '@vocdoni/react-providers'
import { Flex, Image, Link, Tab, TabList, TabPanel, TabPanels, Text } from '@chakra-ui/react'
import { IVoteInfoResponse, PublishedElection } from '@vocdoni/sdk'
import { formatDistance } from 'date-fns'
import { Trans, useTranslation } from 'react-i18next'
import { generatePath, Link as RouterLink } from 'react-router-dom'
import { CopyButton, ReducedTextAndCopy } from '~components/Layout/CopyButton'
import { RawContentBox } from '~components/Layout/ShowRawButton'
import { RoutePath } from '~constants'
import { RouteParamsTabs } from '~components/Layout/RouteParamsTabs'
import { DetailsGrid, GridItemProps } from '~components/Layout/DetailsGrid'
import { processIdGridItem } from '~components/Transactions/TxDetails/SpecificTxDetails'
import { Envelope, VotePackageType } from '@vocdoni/chakra-components'
import { ElectionProvider, useElection } from '@vocdoni/react-providers'

/**
* Show envelope content
Expand Down
2 changes: 1 addition & 1 deletion src/components/Layout/TopBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const TopBar = () => {
const rightLinks: HeaderLink[] = [
{
name: t('links.verify_vote', { defaultValue: 'Verify vote' }),
url: generatePath(RoutePath.Verify, { verifier: null }),
url: generatePath(RoutePath.Verify, { verifier: null, tab: null }),
},
]

Expand Down
2 changes: 1 addition & 1 deletion src/components/Process/Detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ const EnvelopeCard = ({ envelope, count }: { envelope: IElectionVote; count: num
Transaction: {{ transactionIndex: envelope.transactionIndex }}
</Trans>
</Link>
<Link as={RouterLink} to={generatePath(RoutePath.Envelope, { verifier: envelope.voteID })}>
<Link as={RouterLink} to={generatePath(RoutePath.Envelope, { verifier: envelope.voteID, tab: null })}>
<Trans i18nKey={'envelopes.details'}>Details</Trans>
</Link>
</Flex>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Verify/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const SearchVote = ({ compact }: { compact?: boolean }) => {
<Box>
<Button
onClick={() => {
navigate(generatePath(RoutePath.Verify, { verifier }))
navigate(generatePath(RoutePath.Verify, { verifier, tab: null }))
}}
>
<Trans i18nKey={'verify.verify'}>Verify</Trans>
Expand Down

0 comments on commit bb817aa

Please sign in to comment.