-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
297 additions
and
34 deletions.
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
wondrous-bot-admin/src/components/AddFormEntity/components/GitcoinPassportComponent.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import { Grid, Typography } from "@mui/material"; | ||
import { IndexContainer, Label } from "./styles"; | ||
import TextField from "../../Shared/TextField"; | ||
import { TYPES } from "utils/constants"; | ||
|
||
const TextInputStyle = { | ||
width: "50%", | ||
}; | ||
|
||
const GitcoinPassportScore = ({ handleOnChange, value, errors }) => ( | ||
<> | ||
<Label>Question/Prompt</Label> | ||
<TextField | ||
placeholder="Enter prompt here" | ||
value={value?.prompt || ""} | ||
onChange={(value) => handleOnChange("prompt", value)} | ||
multiline={false} | ||
error={errors?.prompt} | ||
/> | ||
<Label>Verify that a user's Gitcoin Passport Score is above this threshold</Label> | ||
<TextField | ||
placeholder="Please enter the minimum score threshold" | ||
value={value?.gitcoinPassportMinimumScoreThreshold} | ||
error={errors?.gitcoinPassportMinimumScoreThreshold} | ||
onChange={(value) => handleOnChange("gitcoinPassportMinimumScoreThreshold", value)} | ||
multiline={false} | ||
style={TextInputStyle} | ||
type="number" | ||
/> | ||
</> | ||
); | ||
|
||
const GitcoinPassportComponent = ({ onChange, value, stepType, error }) => { | ||
const handleOnChange = (key, val) => { | ||
onChange({ | ||
...value, | ||
[key]: val, | ||
}); | ||
}; | ||
|
||
return ( | ||
<Grid | ||
gap="8px" | ||
display="flex" | ||
alignItems="center" | ||
style={{ | ||
width: "100%", | ||
}} | ||
direction="column" | ||
> | ||
<Grid | ||
item | ||
gap="14px" | ||
display="flex" | ||
flexDirection="column" | ||
xs={12} | ||
style={{ | ||
width: "100%", | ||
}} | ||
> | ||
<GitcoinPassportScore handleOnChange={handleOnChange} value={value} errors={error?.additionalData} /> | ||
</Grid> | ||
</Grid> | ||
); | ||
}; | ||
|
||
export default GitcoinPassportComponent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
wondrous-bot-admin/src/components/Rewards/QuestRewardComponent/questUtils.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.