-
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.
Merge branch 'staging' into feat/cmty-user-activity-pg
- Loading branch information
Showing
67 changed files
with
1,396 additions
and
590 deletions.
There are no files selected for viewing
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
Oops, something went wrong.