Skip to content
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

fix: set proper active course having alias in url #2600

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

karlovich
Copy link
Collaborator

🟒 Add deploy label if you want to deploy this Pull Request to staging environment

πŸ§‘β€βš–οΈ Pull Request Naming Convention

  • Title should follow Conventional Commits
  • Do not put issue id in title
  • Do not put WIP in title. Use Draft PR functionality
  • Consider to add area:* label(s)
  • I followed naming convention rules

πŸ€” This is a ...

  • New feature
  • Bug fix
  • Performance optimization
  • Refactoring
  • Test Case
  • Documentation update
  • Other

πŸ”— Related issue link

Closes #2595

πŸ’‘ Background and solution

before the fix

  • useAsync called when router was not ready and alias undefined while it was in page URL

after the fix

  • fetch data and set active course only when router is ready, so if an alias in the url, it is taken into account.
    Also, the proper course is set to localstorage sharing the active course accross the pages

β˜‘οΈ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Database migration is added or not needed
  • Documentation is updated/provided or not needed
  • Changes are tested locally

Copy link

πŸ“¦ Next.js Bundle Analysis

This analysis was generated by the next.js bundle analysis action πŸ€–

Sixty Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (500 KB)
/ 308.74 KB 384.93 KB 76.99% (+/- <0.01%)
/404 243.1 KB 319.3 KB 63.86% (+/- <0.01%)
/admin/auto-test 412.87 KB 489.06 KB 97.81% (🟑 +0.01%)
/admin/auto-test-task/[taskId] 414.82 KB 491.02 KB 98.20% (🟑 +0.01%)
/admin/contributors 378.07 KB 454.27 KB 90.85% (🟑 +0.01%)
/admin/courses 399.38 KB 475.58 KB 95.12% (+/- <0.01%)
/admin/disciplines 349.99 KB 426.19 KB 85.24% (+/- <0.01%)
/admin/discord-server 375.89 KB 452.09 KB 90.42% (+/- <0.01%)
/admin/events 376.55 KB 452.75 KB 90.55% (+/- <0.01%)
/admin/mentor-registry 401.42 KB 477.62 KB 95.52% (🟑 +0.01%)
/admin/notifications 415.27 KB 491.47 KB 98.29% (🟑 +0.01%)
/admin/prompts 357.29 KB 433.48 KB 86.70% (+/- <0.01%)
/admin/registrations 348.74 KB 424.93 KB 84.99% (+/- <0.01%)
/admin/students 364.55 KB 440.75 KB 88.15% (+/- <0.01%)
/admin/tasks 448.08 KB 524.28 KB 104.86% (+/- <0.01%)
/admin/user-group 400.84 KB 477.04 KB 95.41% (+/- <0.01%)
/admin/users 291.82 KB 368.02 KB 73.60% (🟑 +0.01%)
/applicants 332.32 KB 408.52 KB 81.70% (🟑 +0.01%)
/course/admin/certified-students 189.42 KB 265.62 KB 53.12% (🟑 +0.01%)
/course/admin/cross-check-table 475.38 KB 551.58 KB 110.32% (+/- <0.01%)
/course/admin/events 458.63 KB 534.82 KB 106.96% (🟑 +0.01%)
/course/admin/interviews 399.79 KB 475.98 KB 95.20% (+/- <0.01%)
/course/admin/mentor-tasks-review 416.38 KB 492.58 KB 98.52% (+/- <0.01%)
/course/admin/mentors 404.23 KB 480.42 KB 96.08% (🟑 +0.01%)
/course/admin/stage-interviews 401.45 KB 477.65 KB 95.53% (+/- <0.01%)
/course/admin/students 412.83 KB 489.02 KB 97.80% (🟑 +0.01%)
/course/admin/tasks 432.59 KB 508.79 KB 101.76% (+/- <0.01%)
/course/admin/users 399.48 KB 475.68 KB 95.14% (+/- <0.01%)
/course/interview/[type]/feedback 363.31 KB 439.51 KB 87.90% (+/- <0.01%)
/course/mentor/auto-confirm 245.38 KB 321.57 KB 64.31% (🟑 +0.01%)
/course/mentor/confirm 312.74 KB 388.94 KB 77.79% (+/- <0.01%)
/course/mentor/dashboard 419.95 KB 496.14 KB 99.23% (+/- <0.01%)
/course/mentor/expel-student 316.76 KB 392.96 KB 78.59% (+/- <0.01%)
/course/mentor/feedback 319.26 KB 395.46 KB 79.09% (+/- <0.01%)
/course/mentor/interview-technical-screening 284.34 KB 360.53 KB 72.11% (+/- <0.01%)
/course/mentor/interview-wait-list 357.84 KB 434.04 KB 86.81% (+/- <0.01%)
/course/mentor/interviews 368.52 KB 444.72 KB 88.94% (🟑 +0.01%)
/course/mentor/students 273.54 KB 349.74 KB 69.95% (+/- <0.01%)
/course/schedule 500.81 KB 577.01 KB 115.40% (+/- <0.01%)
/course/score 357.81 KB 434.01 KB 86.80% (🟑 +0.01%)
/course/stats 305.6 KB 381.8 KB 76.36% (+/- <0.01%)
/course/student/auto-test 410.44 KB 486.64 KB 97.33% (+/- <0.01%)
/course/student/auto-test/task 410.36 KB 486.56 KB 97.31% (+/- <0.01%)
/course/student/cross-check-review 500.49 KB 576.69 KB 115.34% (+/- <0.01%)
/course/student/cross-check-submit 480.42 KB 556.62 KB 111.32% (🟑 +0.01%)
/course/student/dashboard 416.31 KB 492.5 KB 98.50% (+/- <0.01%)
/course/student/interviews 287.68 KB 363.88 KB 72.78% (+/- <0.01%)
/course/submit-scores 432.64 KB 508.83 KB 101.77% (+/- <0.01%)
/course/team-distributions 401.64 KB 477.84 KB 95.57% (+/- <0.01%)
/course/teams 447.84 KB 524.03 KB 104.81% (+/- <0.01%)
/cv/edit 368.09 KB 444.29 KB 88.86% (+/- <0.01%)
/gratitude 311.29 KB 387.49 KB 77.50% (+/- <0.01%)
/heroes 416.82 KB 493.02 KB 98.60% (🟑 +0.01%)
/job 189.51 KB 265.71 KB 53.14% (+/- <0.01%)
/profile 428.54 KB 504.74 KB 100.95% (+/- <0.01%)
/profile/connection-confirmed 284.56 KB 360.76 KB 72.15% (+/- <0.01%)
/profile/notifications 350.05 KB 426.25 KB 85.25% (+/- <0.01%)
/registry/epamlearningjs 311.92 KB 388.12 KB 77.62% (🟑 +0.01%)
/registry/mentor 361.75 KB 437.95 KB 87.59% (+/- <0.01%)
/registry/student 361.75 KB 437.95 KB 87.59% (+/- <0.01%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 5% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No access error
1 participant