Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modal closed after proposal success #631

Merged
merged 1 commit into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/modules/explorer/pages/DAOList/components/DAOItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const Container = styled(Grid)(({ theme }: { theme: Theme }) => ({
"padding": 32,
"cursor": "pointer",
"transition": "0.15s ease-out",
"maxWidth": 490,

["@media (max-width:1335px)"]: {
minHeight: 130
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const ProposalCreatorModal: React.FC<any> = ({ open, handleClose }) => {
title={"Create Off Chain Poll"}
template="xs"
>
<ProposalCreator />
<ProposalCreator onClose={handleClose} />
</ResponsiveDialog>
)
}
3 changes: 2 additions & 1 deletion src/modules/lite/explorer/pages/CreateProposal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ const calculateEndTime = (days: number, hours: number, minutes: number) => {
return String(time.valueOf())
}

export const ProposalCreator: React.FC<{ id?: string }> = props => {
export const ProposalCreator: React.FC<{ id?: string; onClose?: any }> = props => {
const navigate = useHistory()
const { network, account, wallet } = useTezos()
const openNotification = useNotification()
Expand Down Expand Up @@ -588,6 +588,7 @@ export const ProposalCreator: React.FC<{ id?: string }> = props => {
variant: "success"
})
setIsLoading(false)
props.onClose()
daoId
? navigate.push(`/explorer/dao/${daoId}/proposals`)
: navigate.push(`/explorer/lite/dao/${id}/community`)
Expand Down
Loading