-
Notifications
You must be signed in to change notification settings - Fork 344
refactor(common): convert header to TypeScript #3962
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
refactor(common): convert header to TypeScript #3962
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
src/elements/common/header/Logo.tsx
Outdated
| import './Logo.scss'; | ||
|
|
||
| export interface LogoProps { | ||
| isSmall?: boolean; |
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.
the isSmall prop is not used in this component. Please remove it in this file and in the component that passes this prop.
| import Logo from './Logo'; | ||
| import messages from '../messages'; | ||
| import { VIEW_FOLDER, VIEW_SEARCH } from '../../../constants'; |
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.
| import Logo from './Logo'; | |
| import messages from '../messages'; | |
| import { VIEW_FOLDER, VIEW_SEARCH } from '../../../constants'; | |
| import Logo from './Logo'; | |
| import { VIEW_FOLDER, VIEW_SEARCH } from '../../../constants'; | |
| import messages from '../messages'; |
| @@ -0,0 +1,46 @@ | |||
| import * as React from 'react'; | |||
| import { injectIntl, type IntlShape } from 'react-intl'; | |||
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.
use useIntl instead of injectIntl
|
Closing due to inactivity. |
TypeScript Migration: Header Component
This PR converts the header component in
src/elements/common/headerfrom JavaScript with Flow to TypeScript.Changes
Header.jstoHeader.tsxLogo.jstoLogo.tsxindex.jstoindex.ts.js.flowfiles for backward compatibilityTesting
References
Link to Devin run: https://app.devin.ai/sessions/ec24228ded1945609fc10152e1c1b056