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
Typescriptize MainHeader component #4535
Typescriptize MainHeader component #4535
Conversation
jsapp/js/assetUtils.ts
Outdated
@@ -269,40 +270,40 @@ export function isAssetPublic(permissions?: Permission[]) { | |||
* For getting the icon class name for given asset type. Returned string always | |||
* contains two class names: base `k-icon` and respective CSS class name. |
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.
Is this comment still accurate?
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.
Updated the comment :)
if (sessionStore.currentAccount?.git_rev) { | ||
if ( | ||
'git_rev' in sessionStore.currentAccount && | ||
sessionStore.currentAccount?.git_rev |
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.
I don't fully understand the 2nd check — 'git_rev' in sessionStore.currentAccount
would throw an error if sessionStore.currentAccount isn't an object
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.
Right, I've changed it to check if both of the values we use for rendering are strings.
…ponent # Conflicts: # jsapp/js/app.js # jsapp/js/components/header/mainHeader.component.tsx
Description
Internal code improvements.
Code Review Notes
I had to simplify it a bit, but didn't want to go full refactor on it. I need this to be TS for some other work. Since it's not a small change, I'm not entirely sure I want it merged into
feature/my-projects
, but still want it reviewed. The plan would be to wait for the feature to be merged (soon 🤞), and then change base of this PR to the other feature branch I'm working on.