-
Notifications
You must be signed in to change notification settings - Fork 21
feat: add treasury reports december 2024 #302
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
Conversation
WalkthroughThe pull request updates the treasury page to include December 2024 as a new entry in the Changes
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/pages/treasury.js (1)
177-177
: Consider dynamically defaulting to the latest available month.Hard-coding "December" might become outdated next year. Consider dynamically selecting the latest available month in
MONTHS
rather than manually setting a value.Here’s a suggested approach:
-const [selectedMonth, setSelectedMonth] = useState("December"); +const [selectedMonth, setSelectedMonth] = useState(() => { + const sortedMonths = MONTHS.filter((m) => m.year === "2024"); + // or a more general approach of retrieving the last entry from the array + if (sortedMonths.length) { + return sortedMonths[0].month; + } + return ""; +});
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/pages/treasury.js
(2 hunks)
🔇 Additional comments (1)
src/pages/treasury.js (1)
10-15
: Looks consistent with existing entries, but verify the new IPFS links.This block follows the established format. However, ensure that the newly introduced IPFS hashes and filename references for December 2024 remain valid.
Please run the script below to verify each newly added link is accessible:
✅ Verification successful
Let me check the naming pattern consistency with previous entries to ensure the new IPFS links follow the established format.
IPFS links follow consistent naming patterns and are properly referenced
The new December 2024 entries follow the established patterns:
- Treasury report follows the "monthly-portfolio-snapshot-[YEAR]-[MONTH]-[YEAR].pdf" format seen in recent months
- Risk report follows the "[MONTH]-[YEAR]-redefine-risk-center.[DATE].pdf" format consistent with other recent entries
- Both IPFS hashes are only referenced once in the codebase, specifically in the treasury.js file, which is the expected behavior
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Rapidly check for resource availability on the newly inserted IPFS links. NEW_HASHES=( "QmRtrLrgctXTEtHKeVrjaAguohWJrqdSTCV1STDbyjBP22/december-2024-monthly-portfolio-snapshot-2024-december-2024.pdf" "QmZaVYMfFMnSARFLye7Du9knfCvFPHh374LP4TmuepCZxN/december-2024-redefine-risk-center.01-03-2025.pdf" ) for hash in "${NEW_HASHES[@]}"; do echo "Verifying IPFS hash: $hash" # Searching references in the codebase for consistency rg "$hash" doneLength of output: 1322
Script:
#!/bin/bash # Get a few previous entries to verify naming pattern consistency rg -B 5 "treasuryReport|riskReport" src/pages/treasury.jsLength of output: 6744
Summary by CodeRabbit