Skip to content

Commit

Permalink
Merge pull request #92 from oasisprotocol/csillag/fix-demo-button
Browse files Browse the repository at this point in the history
Fix demo button
  • Loading branch information
csillag authored Oct 28, 2024
2 parents dcf63e8 + cc32f19 commit 3ad27f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/utils/path.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { Params } from 'react-router-dom'
/**
* Get the poll path from a poll or proposal id.
*/
export const getPollPath = (pollId: string): string => `/${proposalIdToSlug(pollId!)}`
export const getPollPath = (pollId: string): string =>
`/${pollId == 'demo' ? 'demo' : proposalIdToSlug(pollId!)}`

/**
* Get the poll ID from the parameters found in the URL, coming from the router.
Expand Down

0 comments on commit 3ad27f2

Please sign in to comment.