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

Converted upload_viewer.jsx to functional component and used i18n for string literals #5753

Conversation

om-chauhan1
Copy link
Contributor

What this PR does

This PR converted the upload_viewer.jsx from class to functional component and used i18n for string literals.

Videos

Before:

Before

After:

After

}
let categoriesList = [];
let categories;
forEach(get(metadata, 'categories', []), (category) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can slowly migrate away from using lodash functions for things which we can natively do in JS.

forEach(get(metadata, 'categories', []), (category) => {

would be just

(metadata.categories ?? []).forEach((category) => {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure

@om-chauhan1 om-chauhan1 force-pushed the RefactorReactClassComponentsStream16 branch from 3083970 to 1743ad2 Compare April 18, 2024 16:33
@om-chauhan1 om-chauhan1 force-pushed the RefactorReactClassComponentsStream16 branch from 1743ad2 to 7788004 Compare April 18, 2024 16:37
@ragesoss ragesoss merged commit da0a58c into WikiEducationFoundation:master Apr 18, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants