website
website copied to clipboard
refactor: update financial data for current year
Description When the year changes, we create a folder for that particular year, and along with that, we need to change the year in some files (scripts/finance/index.js , lib/getUniqueCategories.js and components/FinancialSummary/BarChartComponent.js) to update the bar chart. However, what we can do is write logic to automatically detect the current year and modify the year in those files when we create a folder for the year in the finance section.
Related issue(s) #2686
Deploy Preview for asyncapi-website ready!
Built without sensitive environment variables
| Name | Link |
|---|---|
| Latest commit | 474cdebddcfdd6f047b2a4a6519f795c85277fcc |
| Latest deploy log | https://app.netlify.com/sites/asyncapi-website/deploys/6607041a7293ec0008643558 |
| Deploy Preview | https://deploy-preview-2687--asyncapi-website.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
I know using require with the import statements is a bad practice. but I couldn't think of any other way to solve this issue.
If you have any other method to solve this. I am open to suggestions
⚡️ Lighthouse report for the changes in this PR:
| Category | Score |
|---|---|
| 🔴 Performance | 33 |
| 🟢 Accessibility | 98 |
| 🟢 Best practices | 92 |
| 🟢 SEO | 100 |
| 🔴 PWA | 33 |
Lighthouse ran on https://deploy-preview-2687--asyncapi-website.netlify.app/
@anshgoyalevil can you please review the PR?
@akshatnema @derberg Done! Please review.
Here's the summary of the changes
- Used dynamic imports to import the current year's data files
- Card and ExpensesCard components now take values of Expenses and ExpensesLinks as props
- getUniqueCategory takes Expense as parameter ( previously we were importing the Expenses )
cc : @akshatnema @derberg
@akshatnema Done! Please Review
@akshatnema reminder for this PR