Skip to content
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

Merged
merged 3 commits into from
Mar 21, 2024
Merged

Conversation

Sworzen1
Copy link
Contributor

@Sworzen1 Sworzen1 commented Mar 21, 2024

List of changes

new UI for DRep registration

Checklist

Only UI changes

  • My changes generate no new warnings
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the changelog
  • I have added tests that prove my fix is effective or that my feature works

@Sworzen1 Sworzen1 marked this pull request as ready for review March 21, 2024 09:06
stepNumber: number | string;
component?: JSX.Element;
Copy link
Contributor

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


const isContinueButtonDisabled = !watch("dRepName");

const renderLinks = useCallback(() => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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/",
Copy link
Contributor

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?

Copy link
Contributor Author

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 δικτυακός τόπος

Copy link
Contributor Author

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 ?

@MSzalowski
Copy link
Contributor

Add related issue to pr description

@Sworzen1 Sworzen1 merged commit 4b133e4 into develop Mar 21, 2024
1 of 4 checks passed
@Sworzen1 Sworzen1 deleted the feat/new-drep-registration-flow branch March 21, 2024 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖥 Frontend Frontend related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants