Skip to content

Commit

Permalink
Merge pull request #80 from Chirag018/main
Browse files Browse the repository at this point in the history
Edit distribution modal works & also updates ballot button
  • Loading branch information
escottalexander authored Sep 26, 2023
2 parents 3f6749a + 1890877 commit d0a39e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/nextjs/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=
# modify it to your mongodb connection string
#
# MONGODB_URI="mongodb+srv://username:<password>@project-voting.zpk2zfg.mongodb.net/<DATABASE_NAME>"
MONGODB_URI="mongodb://127.0.0.1:27017/OP-RetroPGF3-Discovery-Voting"
MONGODB_URI="mongodb://127.0.0.1:27017/OP-RetroPGF3-Discovery-Voting"
9 changes: 5 additions & 4 deletions packages/nextjs/components/project/ProjectHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const ProjectHeader = ({ project }: { project: ProjectDocument }) => {
// const [addVote, setAddVote] = useState(false);
const [addressCopied, setAddressCopied] = useState(false);
const [openLikedModal, setOpenLikedModal] = useState(false);
const [newAllocation, setNewAllocation] = useState("");
const [newAllocation, setNewAllocation] = useState(0);
// const [addBallot, setAddBallot] = useState(false);
const [editBallotVote, setEditBallotVote] = useState(false);
// const [editBallot, setEditBallot] = useState(false);
Expand All @@ -41,19 +41,20 @@ const ProjectHeader = ({ project }: { project: ProjectDocument }) => {

const addProjectToBallot = () => {
const _name = project.name as string;
setNewAllocation(0);
setNewAllocation(1);
dispatch({
type: "ADD_PROJECT",
project: {
id: project._id,
name: _name,
allocation: 0,
allocation: 1,
},
});
notification.success("Added to ballot");
};
const handleAllocationChange = value => {
setNewAllocation(value);
setNewAllocation(Number(value));
// state.projects.reduce((sum, p) => sum + p.allocation, value);
};

const handleEditBallot = () => {
Expand Down

0 comments on commit d0a39e6

Please sign in to comment.