-
Notifications
You must be signed in to change notification settings - Fork 11
Updated BaniList component to use 'token' for key extraction, added '… #250
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
base: dev
Are you sure you want to change the base?
Updated BaniList component to use 'token' for key extraction, added '… #250
Conversation
…token' field to Bani details extraction, and modified database query to include 'Token' field.
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.
Pull Request Overview
This PR updates the BaniList component and related files to include a new "token" field for key extraction and details display in the Bani data. Key changes include:
- Modifying the database query in db.js to select the Token column and include it in the result objects.
- Adding a token property in the default Bani order and updating the extraction helper accordingly.
- Changing the key extractor in BaniList.jsx to use the token field, with an added console log for debugging.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/database/db.js | Updated SQL query and object construction to include token. |
| src/common/defaultBaniOrder.js | Added token property in the default order object. |
| src/common/components/BaniList/baniOrderHelper.js | Included token in the bani item details extraction. |
| src/common/components/BaniList/BaniList.jsx | Changed key extraction to use token and added debug logging. |
| translit: getTranslitText(Transliterations, language), | ||
| }); | ||
| } | ||
| console.log("Bani List", totalResults); |
Copilot
AI
May 13, 2025
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.
[nitpick] The debug logging statement may be unintentionally left in production code; consider removing it or wrapping it under a debug flag.
| console.log("Bani List", totalResults); | |
| if (process.env.DEBUG) { | |
| logMessage("Bani List", totalResults); | |
| } |
src/common/defaultBaniOrder.js
Outdated
| { | ||
| gurmukhi: "22 vwrW", | ||
| translit: "22 varaa(n)", | ||
| token:"22vwrW" |
Copilot
AI
May 13, 2025
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.
Ensure that the token property is properly delimited; if the following property is 'folder', a trailing comma might be required to maintain valid syntax.
| token:"22vwrW" | |
| token:"22vwrW", |
…added 'token' field to Bani details, and updated folder handling in baniOrderHelper for improved data structure consistency.
…token' field to Bani details extraction, and modified database query to include 'Token' field.