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

Layout for "Manage starnames/iovnames/names" views #1048

Merged

Conversation

albertandrejev
Copy link
Contributor

@albertandrejev albertandrejev commented Mar 4, 2020

Closes #1021.

Starname manage
starname_manage

Starname update
starname_edit

Name manage
name_manage

Name update
name_edit

Iovname manage
iovname_manage

Iovname update
iovname_edit

import AccountManage from "./manage";
import AccountRegister from "./register";
import AccountUpdate from "./update";

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe move AccountEntity type from "./register" here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, do not understand you.

Copy link
Contributor

Choose a reason for hiding this comment

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

You have the subdirectories: manage, register, and update. All of them use the AccountEntity type and AccountProps interface from the register subdirectory. Since the three of them use them, it no longer makes sense to have those declared in register, they should be declared on the root, which is this file.

So between the imports and the export you can declare:

type AccountEntity = "iovname" | "starname" | "name";

interface AccountProps {
  entity: AccountEntity;
}

Add them to the export, and removed them from the register's index.tsx.

@albertandrejev albertandrejev merged commit 28cde04 into milestone/account-module-support Mar 16, 2020
@albertandrejev albertandrejev deleted the feature/#1021-manage-names branch March 16, 2020 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bierzo Wallet Frontend 😊 For Frontend Development
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants