Skip to content

Fix : Replaced any types in Alerts Page with strict interfaces#2152

Merged
dipexplorer merged 1 commit into
RatLoopz:mainfrom
hrx01-dev:fix/Replace-any-types-in-AlertsPage-with-strict-interfaces
Jun 20, 2026
Merged

Fix : Replaced any types in Alerts Page with strict interfaces#2152
dipexplorer merged 1 commit into
RatLoopz:mainfrom
hrx01-dev:fix/Replace-any-types-in-AlertsPage-with-strict-interfaces

Conversation

@hrx01-dev

Copy link
Copy Markdown
Contributor

🛑 STOP: Assignment & File Scope Check

  • I am assigned to this issue.
  • I verified that this PR ONLY touches the required files.

Warning

PRs with unrelated files will not be reviewed and may be closed.

📋 PR Summary & Link

  • **Closes [Bug] Replace any types in Alerts Page with strict interfaces #2078 **

  • Summary:

  • Created an Alert interface containing all the expected properties of the alert object (like id, cdsco_approval_status, is_counterfeit_alert, alert_type, brand_name, batch_number, etc.).

  • Updated the useState hook for allAlerts to use Alert[] instead of any[].

  • Updated the handleShareAlert function signature to accept alert: Alert instead of alert: any.

  • For formatRelativeTime, I added a || null fallback so that it receives null instead of undefined when both dates are missing.

  • For the CopyButton, I added a || "" fallback so that it receives an empty string instead of undefined when alert.batch_number is absent.

📸 Proof of Work (Screenshots / Logs)

Important

No Pull Request will be merged without proof of testing!

  • Frontend/UI changes: You MUST attach screenshots or screen recordings (GIFs/Videos) showing the UI changes.

Please drag & drop your screenshots/GIFs here:

🏷️ PR Type

  • 🐛 type: bug
  • type: feature
  • 📖 type: docs
  • 🧪 type: testing
  • 🔒 type: security
  • type: performance
  • 🎨 type: design
  • ♻️ type: refactor
  • 🛠️ type: devops
  • type: accessibility

✅ Checklist

  • My PR has a linked issue (Closes #123)
  • I have pulled the latest main and resolved any conflicts

@github-project-automation github-project-automation Bot moved this to 📥 Backlog in SahiDawa Workflow Jun 20, 2026
@github-actions github-actions Bot added gssoc:approved Approved for gssoc good first issue Good for newcomers level:beginner 20 pts quality:clean multiplier x1.2 status: open-for-all type:bug Something isn't working labels Jun 20, 2026
@dipexplorer dipexplorer added the type:refactor Code structure cleanup without behavior change label Jun 20, 2026
@dipexplorer dipexplorer merged commit b85ba11 into RatLoopz:main Jun 20, 2026
16 of 17 checks passed
@github-project-automation github-project-automation Bot moved this from 📥 Backlog to 🎉 Merged in SahiDawa Workflow Jun 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Congratulations @hrx01-dev! Your Pull Request " Fix : Replaced any types in Alerts Page with strict interfaces" has been successfully merged by @dipexplorer.

Thank you for your valuable contribution to SahiDawa! 🇮🇳
If this was for GSSoC 2026, your work is officially merged and valid. Keep up the great work and feel free to claim other open issues. 🚀

Follow us on LinkedIn: https://www.linkedin.com/company/ratloopz/ to get shoutout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good first issue Good for newcomers gssoc:approved Approved for gssoc level:beginner 20 pts quality:clean multiplier x1.2 status: open-for-all type:bug Something isn't working type:refactor Code structure cleanup without behavior change

Projects

Status: 🎉 Merged

Development

Successfully merging this pull request may close these issues.

[Bug] Replace any types in Alerts Page with strict interfaces

2 participants