-
Notifications
You must be signed in to change notification settings - Fork 7
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
fix: eslint #199
fix: eslint #199
Conversation
amitojsingh
commented
Jun 18, 2024
•
edited
Loading
edited
- Fix Eslint errors.
- Refactored the code.
- added footer for next bani.
src/ReaderScreen/utils/index.js
Outdated
return color || null; | ||
}; | ||
|
||
export const fontSizeForReader = (SIZE, header, transliteration) => { |
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.
@amitojsingh veerji,
SIZE
is the only parameter in full caps, any specific reason for this?
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.
Also, there is another variable, in small caps size
. Can you use different name for parameter or the variable?
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.
fixed veer ji.
[constant.GURMUKHI]: gurmukhiMapping, | ||
[constant.TRANSLITERATION]: getHeaderColor1(), | ||
[constant.TRANSLATION]: defaultColor, | ||
}; |
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.
What do you think about destructuring the constant
object before this? And use GURMUKHI, TRANSLITERATION, and TRANSLATION directly?
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.
Fixed Veer ji.
); | ||
} | ||
|
||
contentHtml += `</div>`; |
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.
Can we not use JSX to build this markup, instead of doing it manually from strings?
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.
nopes veer ji as we tried multiple ways as we discussed earlier and we finalized this way.