-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat/new-drep-registration-flow #528
Conversation
stepNumber: number | string; | ||
component?: JSX.Element; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ReactNode is the more appropriate type for React elements. JSX.Element is more minimalistic and as far as we don't want to create custom JSX Elements from which we would extend JSX.Element
there is no need to use that as a component property
govtool/frontend/src/components/organisms/CreateGovernanceActionSteps/StorageInformation.tsx
Show resolved
Hide resolved
govtool/frontend/src/components/organisms/CreateGovernanceActionSteps/StorageInformation.tsx
Show resolved
Hide resolved
govtool/frontend/src/components/organisms/CreateGovernanceActionSteps/StorageInformation.tsx
Show resolved
Hide resolved
|
||
const isContinueButtonDisabled = !watch("dRepName"); | ||
|
||
const renderLinks = useCallback(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const renderLinks = useCallback(() => { | |
const renderLinks = useCallback( | |
() => | |
links.map((field, index) => ( | |
<ControlledField.Input | |
{...register(`links.${index}.link`)} | |
errors={errors} | |
endAdornment={ | |
links.length > 1 ? ( | |
<DeleteOutlineIcon | |
color="primary" | |
sx={{ cursor: 'pointer', height: 24, with: 24 }} | |
onClick={() => removeLink(index)} | |
/> | |
) : null | |
} | |
key={field.id} | |
label={t('forms.link') + ` ${index + 1}`} | |
layoutStyles={{ mb: 3 }} | |
placeholder={t('forms.linkPlaceholder')} | |
name={`links.${index}.link`} | |
rules={{ | |
pattern: { | |
value: URL_REGEX, | |
message: t('createGovernanceAction.fields.validations.url'), | |
}, | |
}} | |
/> | |
)), | |
[links], | |
); |
@@ -285,6 +285,7 @@ export const en = { | |||
hashPlaceholder: "The hash of metadata at URL", | |||
howCreateUrlAndHash: "How to create URL and hash?", | |||
link: "Link", | |||
linkPlaceholder: "https://website.com/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should be in consts instead of translation - How would that link look like in eg.: Greek?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idk, we dont have Greek :) maybe δικτυακός τόπος
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think it will be the same placeholder for example:
Enter your email
in english and greek ?
Add related issue to pr description |
List of changes
new UI for DRep registration
Checklist
Only UI changes