Skip to content

Quiz#93

Merged
TheekshanaWijerathne merged 7 commits intomasterfrom
quiz
May 9, 2025
Merged

Quiz#93
TheekshanaWijerathne merged 7 commits intomasterfrom
quiz

Conversation

@vinukab
Copy link
Copy Markdown
Contributor

@vinukab vinukab commented May 9, 2025

No description provided.

Copy link
Copy Markdown
Contributor

@TheekshanaWijerathne TheekshanaWijerathne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything seems fine

@TheekshanaWijerathne TheekshanaWijerathne self-requested a review May 9, 2025 14:03
Copy link
Copy Markdown
Contributor

@erandatheewijeratne erandatheewijeratne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@TheekshanaWijerathne TheekshanaWijerathne merged commit c1753d1 into master May 9, 2025
6 checks passed
@erandatheewijeratne
Copy link
Copy Markdown
Contributor

This pull request introduces several enhancements and fixes to the PortfolioOptimizationPage and RiskAssessment components in the dashboard. The changes include adding new API integrations, improving error handling, and cleaning up the code for better readability and maintainability.

API Integrations:

  • Integrated a new API call in PortfolioOptimizationPage to fetch the user's risk score using AxiosInstance and store it in state. This ensures real-time updates for risk-related data.
  • Updated the RiskAssessment component to persist the quiz's risk score to the backend using a POST request and fetch the current user on component mount. [1] [2]

Error Handling Improvements:

  • Enhanced error handling in PortfolioOptimizationPage by improving the formatting and clarity of error messages displayed when fetching user data or budget information fails.

Code Cleanup and Formatting:

  • Refactored multiple sections of PortfolioOptimizationPage for better readability, including reformatting JSX elements and aligning function definitions. [1] [2] [3]
  • Reorganized and cleaned up the RiskAssessment component, removing unused code and adding necessary imports for consistency. [1] [2]

New Interfaces:

  • Added a RiskScoreOut interface to type the response from the risk score API, ensuring type safety in the application.

Minor Fixes:

  • Fixed formatting issues in various JSX elements and adjusted indentation for consistency across the codebase. [1] [2] [3]

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants