-
Notifications
You must be signed in to change notification settings - Fork 62
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: init schema & space create page #115
Conversation
const { code, data } = (await service.execNGQL({ | ||
gql: `DESCRIBE SPACE ${handleKeyword(space)}`, | ||
})) as any; | ||
return { code, data }; | ||
} | ||
|
||
asyncGetSpacesList = async(_payload) => { | ||
getSpacesList = async() => { | ||
const res = await this.getSpaces(); | ||
if (res.data) { | ||
const spaces: ISpace[] = []; |
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.
why not get spaces from globalStore?
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.
and there is a useless const spaces
?
|
||
|
||
|
||
const Schema = () => { |
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.
remove empty blocks
}, | ||
...numberRulesFn(intl), | ||
]}> | ||
<Input /> |
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.
Input maybe need a placeholder
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.
optional chaining
@@ -31,16 +31,24 @@ const itemRender = (route, _params, routes, _paths) => { | |||
); | |||
}; | |||
|
|||
const Breadcrumb: React.FC<IProps> = (props: IProps) => { | |||
const NebulaBreadcrumb: React.FC<IProps> = (props: IProps) => { | |||
const { routes, ExtraNode } = props; |
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.
better to use extraNode
?
const list = [...keyWords, ...operators, ...ban].filter(item => { | ||
return item.indexOf(str) === 0; | ||
}); |
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 list = [...keyWords, ...operators, ...ban].filter(item => item.startsWith(str));
blur = instance => { | ||
if (this.props.onBlur) { | ||
this.props.onBlur(instance.doc.getValue()); | ||
} | ||
}; |
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.
it's more elegant to use optional chaining instead of a && a.b && a.b()
blur = instance => this.props.onBlur?.(instance.doc.getValue());
80e8e58
to
9c390e2
Compare
mod: code review mod: code review
9c390e2
to
a8e418c
Compare
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.
LGTM
No description provided.