Skip to content

Commit

Permalink
Merge pull request #719 from dOrgTech/bug-707
Browse files Browse the repository at this point in the history
deeplink fixed
  • Loading branch information
fabiolalombardim authored Nov 24, 2023
2 parents 3f2b85b + fed0053 commit 0938a65
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/modules/lite/explorer/pages/ProposalDetails/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React, { useEffect, useState } from "react"
import { Button, Grid, styled, useMediaQuery, useTheme } from "@material-ui/core"
import { Button, Grid, Typography, styled, useMediaQuery, useTheme } from "@material-ui/core"
import { ProposalDetailCard } from "../../components/ProposalDetailCard"
import { GridContainer } from "modules/common/GridContainer"
import { ChoiceItemSelected } from "../../components/ChoiceItemSelected"
import { VoteDetails } from "../../components/VoteDetails"
import { useLocation, useParams } from "react-router-dom"
import { useHistory, useLocation, useParams } from "react-router-dom"
import { Poll } from "models/Polls"
import { Choice } from "models/Choice"
import { useTezos } from "services/beacon/hooks/useTezos"
Expand All @@ -19,6 +19,7 @@ import { voteOnLiteProposal } from "services/services/lite/lite-services"
import { useDAO } from "services/services/dao/hooks/useDAO"
import { useTokenVoteWeight } from "services/contracts/token/hooks/useTokenVoteWeight"
import BigNumber from "bignumber.js"
import { ArrowBackIosOutlined } from "@material-ui/icons"

const PageContainer = styled("div")({
marginBottom: 50,
Expand Down Expand Up @@ -54,7 +55,7 @@ export const ProposalDetails: React.FC<{ id: string }> = ({ id }) => {
const theme = useTheme()
const isMobileSmall = useMediaQuery(theme.breakpoints.down("sm"))
const { state } = useLocation<{ poll: Poll; choices: Choice[]; daoId: string }>()

const navigate = useHistory()
const { data: dao } = useDAO(state?.daoId)
const { account, wallet } = useTezos()
const openNotification = useNotification()
Expand Down Expand Up @@ -133,7 +134,15 @@ export const ProposalDetails: React.FC<{ id: string }> = ({ id }) => {
return (
<PageContainer style={{ gap: 30 }}>
<Grid container>
<BackButton />
<Grid
container
style={{ gap: 15, cursor: "pointer", marginBottom: 23 }}
onClick={() => navigate.push(`/explorer/lite/dao/${id}/community/`)}
alignItems="center"
>
<ArrowBackIosOutlined color="secondary" />
<Typography color="secondary">Back to community</Typography>
</Grid>
</Grid>
<Grid container style={{ gap: 30 }}>
<Grid item>
Expand Down

0 comments on commit 0938a65

Please sign in to comment.