diff --git a/package.json b/package.json index 41dd590..0b48556 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ghost-dao-interface", "private": true, - "version": "0.5.3", + "version": "0.5.4", "type": "module", "scripts": { "dev": "vite", diff --git a/src/App.jsx b/src/App.jsx index f6b3f03..d7a455b 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -33,6 +33,7 @@ const Bridge = lazy(() => import("./containers/Bridge/Bridge")); const NotFound = lazy(() => import("./containers/NotFound/NotFound")); const Governance = lazy(() => import("./containers/Governance/Governance")); const ProposalDetails = lazy(() => import("./containers/Governance/ProposalDetails")); +const NewProposal = lazy(() => import("./containers/Governance/NewProposal")); const PREFIX = "App"; @@ -217,6 +218,7 @@ function App() { } /> } /> } /> + } /> } { { const isSemiSmallScreen = useMediaQuery("(max-width: 745px)"); const isSmallScreen = useMediaQuery("(max-width: 650px)"); const isVerySmallScreen = useMediaQuery("(max-width: 379px)"); + const navigate = useNavigate(); const { symbol: ghstSymbol } = useTokenSymbol(chainId, "GHST"); const handleModal = () => { - alert("proposal modal here"); + const navigate = useNavigate(); } useEffect(() => { @@ -72,7 +74,7 @@ const Governance = ({ connect, config, address, chainId }) => { handleModal(true)} + onClick={() => navigate(`/governance/create`)} sx={{ maxWidth: isSemiSmallScreen ? "100%" : "350px" }} > Create Proposal diff --git a/src/containers/Governance/NewProposal.jsx b/src/containers/Governance/NewProposal.jsx new file mode 100644 index 0000000..b377792 --- /dev/null +++ b/src/containers/Governance/NewProposal.jsx @@ -0,0 +1,76 @@ +import { useState } from "react"; + +import { + Box, + Container, + Typography, + OutlinedInput, + InputLabel, + FormControl, + useMediaQuery, +} from "@mui/material"; + +import Paper from "../../components/Paper/Paper"; +import PageTitle from "../../components/PageTitle/PageTitle"; +import { PrimaryButton } from "../../components/Button"; + +const NewProposal = ({ config, address, connect, chainId }) => { + const isSemiSmallScreen = useMediaQuery("(max-width: 745px)"); + const isSmallScreen = useMediaQuery("(max-width: 650px)"); + const isVerySmallScreen = useMediaQuery("(max-width: 379px)"); + + const [descriptionUrl, setDescriptionUrl] = useState(""); + + return ( + + + + + + + Proposal Overview + + + } + > + + + + + + ) +} + +const BasicInput = ({ id, label, value, eventHandler }) => { + return ( + + {label} + + + eventHandler(event.currentTarget.value)} + /> + + + + ) +} + +export default NewProposal;