Skip to content

Commit

Permalink
Merge pull request #100 from GenaDrop/stagging
Browse files Browse the repository at this point in the history
Stagging to main
  • Loading branch information
Ebube111 authored Jan 30, 2024
2 parents a766cb6 + a8f8455 commit b006300
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 26 deletions.
3 changes: 1 addition & 2 deletions apps/BosGenaDrop/widget/CPlanet/DropsFund/Admin/Index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ const [submissionEnd, setSubmissionEnd] = useState("")
const [votingStart, setVotingStart] = useState("")
const [votingEnd, setVotingEnd] = useState("")

const testAccounts = ['genadrop.near', 'agwaze.near', 'minorityprogrammers.near', 'bashorun.near', 'jgodwill.near']
const testContract = Storage.get("testContract") || false
const testContract = props?.env === 'true' ? true : false


function convertToTimestamp(dateString) {
Expand Down
2 changes: 1 addition & 1 deletion apps/BosGenaDrop/widget/CPlanet/DropsFund/Contest/Card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ const TextContent = styled.div`
}
`

const testContract = Storage.get("testContract") || false
const testContract = props?.testContract



Expand Down
4 changes: 4 additions & 0 deletions apps/BosGenaDrop/widget/CPlanet/DropsFund/Contest/Content.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ const searchInputHandler = (e) => {
};

const isUserInCouncil = props?.councilMembers ? props?.councilMembers?.includes(context?.accountId) : false;
const testContract = props.testContract || false;

return (
<>
<Root>
Expand All @@ -142,6 +144,7 @@ return (
content: data[1],
isOpen: props.isOpen,
daoId: props.daoId,
testContract,
councilMember: isUserInCouncil,
contestName: props?.contestName,
winners: props.winners,
Expand All @@ -159,6 +162,7 @@ return (
isOpen: props.isOpen,
winners: props.winners,
daoId: props.daoId,
testContract,
contestName: props?.contestName,
councilMember: isUserInCouncil,
isClosed: props.isClosed,
Expand Down
7 changes: 5 additions & 2 deletions apps/BosGenaDrop/widget/CPlanet/DropsFund/Contest/Index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ const NoContest = styled.div`

const adminLists = ['genadrop.near', 'agwaze.near', 'minorityprogrammers.near', 'bashorun.near', 'jgodwill.near']

const testContract = Storage.get("testContract")
const testContract = Storage.get("testContract") || false



Expand Down Expand Up @@ -321,7 +321,7 @@ return (
<div className="buttons">
<a
onClick={() => props.update({ tab: "singleContest" })}
href={`#/bos.genadrop.near/widget/CPlanet.DropsFund.Admin.Index`}
href={`#/bos.genadrop.near/widget/CPlanet.DropsFund.Admin.Index?env=${testContract}`}
className=""
>
Create Contest
Expand Down Expand Up @@ -395,6 +395,7 @@ return (
isSubmissionOpen: isFutureTimestamp(data[1]?.submission_end_time),
isVotingEnded: isFutureTimestamp(data[1]?.voting_end_time),
id: data[0],
isTest: testContract,
update: props.update,
isGateway: props.isGateway
}}
Expand All @@ -409,6 +410,7 @@ return (
update: props.update,
isSubmissionOpen: isFutureTimestamp(data[1]?.submission_end_time),
isVotingEnded: isFutureTimestamp(data[1]?.voting_end_time),
isTest: testContract,
id: data[0],
update: props.update,
isGateway: props.isGateway
Expand All @@ -429,6 +431,7 @@ return (
update: props.update,
isSubmissionOpen: isFutureTimestamp(data[1]?.submission_end_time),
isVotingEnded: isFutureTimestamp(data[1]?.voting_end_time),
isTest: testContract,
id: data[0],
update: props.update,
isGateway: props.isGateway
Expand Down
3 changes: 1 addition & 2 deletions apps/BosGenaDrop/widget/CPlanet/DropsFund/Contest/Rules.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,7 @@ const NoVote = styled.div`
`

const [openModal, setOpenModal] = useState(false);
const testContract = Storage.get("testContract") || false

const testContract = props.testContract || false;

const handleArtSelection = (nft_data) => {
Near.call(
Expand Down
7 changes: 3 additions & 4 deletions apps/BosGenaDrop/widget/CPlanet/DropsFund/Contest/Single.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,8 @@ const PriceBucket = styled.div`


const contestId = props.contestId;
const testContract = props?.status === 'true' ? true : false
const [userSubmitted, setUserSubmitted] = useState(false);
const testContract = Storage.get("testContract") || false



if(!contestId) {
return (
Expand All @@ -283,7 +281,6 @@ const contestArts = Near.view(testContract ? "fund-beta.genadrop.near" : "contes
subscribe: true,
});

console.log(contestArts)

if(!contest) {
return (
Expand Down Expand Up @@ -427,6 +424,7 @@ return (
contestName: contest?.title,
winners: contest.winners,
daoId: contest.dao_id,
testContract,
isClosed,
councilMembers: councilMembers,
userSubmitted,
Expand All @@ -440,6 +438,7 @@ return (
props={{
isClosed,
isOpen,
testContract,
winners: contest.winners,
usersArts: contestArts,
contestId,
Expand Down
4 changes: 2 additions & 2 deletions apps/BosGenaDrop/widget/CPlanet/DropsFund/Explore/Card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ return (
onClick={() => props.update({ tab: "singleContest" })}
href={
props.isGateway
? `#/bos.genadrop.near/widget/CPlanet.DropsFund.Contest.Single?&contestId=${props.id}`
: `#/bos.genadrop.near/widget/CPlanet.Index?tab=singleContest&contestId=${props.id}`
? `#/bos.genadrop.near/widget/CPlanet.DropsFund.Contest.Single?&contestId=${props.id}&status=${props?.isTest}`
: `#/bos.genadrop.near/widget/CPlanet.Index?tab=singleContest&contestId=${props.id}&status=${props?.isTest}`
}
className="card-button"
>
Expand Down
3 changes: 1 addition & 2 deletions build/BosGenaDrop/src/CPlanet/DropsFund/Admin/Index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ const [submissionEnd, setSubmissionEnd] = useState("")
const [votingStart, setVotingStart] = useState("")
const [votingEnd, setVotingEnd] = useState("")

const testAccounts = ['genadrop.near', 'agwaze.near', 'minorityprogrammers.near', 'bashorun.near', 'jgodwill.near']
const testContract = Storage.get("testContract") || false
const testContract = props?.env === 'true' ? true : false


function convertToTimestamp(dateString) {
Expand Down
2 changes: 1 addition & 1 deletion build/BosGenaDrop/src/CPlanet/DropsFund/Contest/Card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ const TextContent = styled.div`
}
`

const testContract = Storage.get("testContract") || false
const testContract = props?.testContract



Expand Down
4 changes: 4 additions & 0 deletions build/BosGenaDrop/src/CPlanet/DropsFund/Contest/Content.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ const searchInputHandler = (e) => {
};

const isUserInCouncil = props?.councilMembers ? props?.councilMembers?.includes(context?.accountId) : false;
const testContract = props.testContract || false;

return (
<>
<Root>
Expand All @@ -142,6 +144,7 @@ return (
content: data[1],
isOpen: props.isOpen,
daoId: props.daoId,
testContract,
councilMember: isUserInCouncil,
contestName: props?.contestName,
winners: props.winners,
Expand All @@ -159,6 +162,7 @@ return (
isOpen: props.isOpen,
winners: props.winners,
daoId: props.daoId,
testContract,
contestName: props?.contestName,
councilMember: isUserInCouncil,
isClosed: props.isClosed,
Expand Down
7 changes: 5 additions & 2 deletions build/BosGenaDrop/src/CPlanet/DropsFund/Contest/Index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ const NoContest = styled.div`

const adminLists = ['genadrop.near', 'agwaze.near', 'minorityprogrammers.near', 'bashorun.near', 'jgodwill.near']

const testContract = Storage.get("testContract")
const testContract = Storage.get("testContract") || false



Expand Down Expand Up @@ -321,7 +321,7 @@ return (
<div className="buttons">
<a
onClick={() => props.update({ tab: "singleContest" })}
href={`#/bos.genadrop.near/widget/CPlanet.DropsFund.Admin.Index`}
href={`#/bos.genadrop.near/widget/CPlanet.DropsFund.Admin.Index?env=${testContract}`}
className=""
>
Create Contest
Expand Down Expand Up @@ -395,6 +395,7 @@ return (
isSubmissionOpen: isFutureTimestamp(data[1]?.submission_end_time),
isVotingEnded: isFutureTimestamp(data[1]?.voting_end_time),
id: data[0],
isTest: testContract,
update: props.update,
isGateway: props.isGateway
}}
Expand All @@ -409,6 +410,7 @@ return (
update: props.update,
isSubmissionOpen: isFutureTimestamp(data[1]?.submission_end_time),
isVotingEnded: isFutureTimestamp(data[1]?.voting_end_time),
isTest: testContract,
id: data[0],
update: props.update,
isGateway: props.isGateway
Expand All @@ -429,6 +431,7 @@ return (
update: props.update,
isSubmissionOpen: isFutureTimestamp(data[1]?.submission_end_time),
isVotingEnded: isFutureTimestamp(data[1]?.voting_end_time),
isTest: testContract,
id: data[0],
update: props.update,
isGateway: props.isGateway
Expand Down
3 changes: 1 addition & 2 deletions build/BosGenaDrop/src/CPlanet/DropsFund/Contest/Rules.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,7 @@ const NoVote = styled.div`
`

const [openModal, setOpenModal] = useState(false);
const testContract = Storage.get("testContract") || false

const testContract = props.testContract || false;

const handleArtSelection = (nft_data) => {
Near.call(
Expand Down
7 changes: 3 additions & 4 deletions build/BosGenaDrop/src/CPlanet/DropsFund/Contest/Single.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,8 @@ const PriceBucket = styled.div`


const contestId = props.contestId;
const testContract = props?.status === 'true' ? true : false
const [userSubmitted, setUserSubmitted] = useState(false);
const testContract = Storage.get("testContract") || false



if(!contestId) {
return (
Expand All @@ -283,7 +281,6 @@ const contestArts = Near.view(testContract ? "fund-beta.genadrop.near" : "contes
subscribe: true,
});

console.log(contestArts)

if(!contest) {
return (
Expand Down Expand Up @@ -427,6 +424,7 @@ return (
contestName: contest?.title,
winners: contest.winners,
daoId: contest.dao_id,
testContract,
isClosed,
councilMembers: councilMembers,
userSubmitted,
Expand All @@ -440,6 +438,7 @@ return (
props={{
isClosed,
isOpen,
testContract,
winners: contest.winners,
usersArts: contestArts,
contestId,
Expand Down
4 changes: 2 additions & 2 deletions build/BosGenaDrop/src/CPlanet/DropsFund/Explore/Card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ return (
onClick={() => props.update({ tab: "singleContest" })}
href={
props.isGateway
? `#/bos.genadrop.near/widget/CPlanet.DropsFund.Contest.Single?&contestId=${props.id}`
: `#/bos.genadrop.near/widget/CPlanet.Index?tab=singleContest&contestId=${props.id}`
? `#/bos.genadrop.near/widget/CPlanet.DropsFund.Contest.Single?&contestId=${props.id}&status=${props?.isTest}`
: `#/bos.genadrop.near/widget/CPlanet.Index?tab=singleContest&contestId=${props.id}&status=${props?.isTest}`
}
className="card-button"
>
Expand Down

0 comments on commit b006300

Please sign in to comment.