Closed kemuru closed 21 hours ago
The changes in this pull request primarily involve modifying several components to replace the useNavigate
hook from react-router-dom
with the Link
component for navigation. This transition allows for a more declarative approach to routing, simplifying the navigation logic within the CasesDisplay
, DisputeCardView
, DisputeListView
, and Header
components. Additionally, multiple components, including CaseDetails
, AttachmentDisplay
, CasesFetcher
, CourtDetails
, Dashboard
, GetPnk
, Home
, Resolver
, and EmailConfirmation
, have been updated to include the ScrollTop
component to manage scroll behavior when the component mounts.
File Path | Change Summary |
---|---|
web/src/components/CasesDisplay/index.tsx |
Replaced useNavigate with Link for navigation; button now uses Link for declarative routing. |
web/src/components/DisputeView/DisputeCardView.tsx |
Replaced useNavigate with Link ; StyledCard wrapped in Link for direct navigation. |
web/src/components/DisputeView/DisputeListView.tsx |
Replaced useNavigate with Link ; StyledListItem wrapped in Link for direct navigation. |
web/src/pages/Home/CourtOverview/Header.tsx |
Replaced useNavigate with Link for navigation; button now uses Link for declarative routing. |
web/src/pages/Cases/CaseDetails/index.tsx |
Added ScrollTop component to manage scroll behavior. |
web/src/pages/Cases/AttachmentDisplay/index.tsx |
Added ScrollTop component to manage scroll behavior. |
web/src/pages/Cases/CasesFetcher.tsx |
Added ScrollTop component to manage scroll behavior. |
web/src/pages/Courts/CourtDetails/index.tsx |
Added ScrollTop component to manage scroll behavior. |
web/src/pages/Dashboard/index.tsx |
Added ScrollTop component to manage scroll behavior. |
web/src/pages/GetPnk/index.tsx |
Added ScrollTop component to manage scroll behavior. |
web/src/pages/Home/index.tsx |
Added ScrollTop component to manage scroll behavior. |
web/src/pages/Resolver/index.tsx |
Added ScrollTop component to manage scroll behavior. |
web/src/pages/Settings/EmailConfirmation/index.tsx |
Added ScrollTop component to manage scroll behavior. |
web/src/pages/Dashboard/Courts/CourtCard/CourtName.tsx |
Replaced LightButton with Link ; modified styling and navigation logic. |
web/src/components/Field.tsx |
Removed useScrollTop hook and its usage. |
web/src/components/ScrollTop.tsx |
Introduced new ScrollTop component to manage scroll behavior on mount. |
Link
components instead of useNavigate
, which is similar to the main PR's changes in the CasesDisplay
component.CourtCard
and CourtName
components, which may involve navigation improvements similar to those in the main PR.transactionHash
field in the EvidenceCard
and other components enhances user feedback, which aligns with the main PR's focus on improving user interactions in the CasesDisplay
component.CasesDisplay
component.Type: FeatureπΏ
π In the code we hop and play,
Links replace the navigate way.
With a scroll to the top, we cheer,
A smoother path for all to steer!
Components gleam, all bright and new,
Hooray for changes, fresh and true! π
Name | Link |
---|---|
Latest commit | 8437b2e51c17058908a27ca56b19894b777a016e |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-university/deploys/674882baa038fc00080fd240 |
Deploy Preview | https://deploy-preview-1760--kleros-v2-university.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.
Name | Link |
---|---|
Latest commit | 8437b2e51c17058908a27ca56b19894b777a016e |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-neo/deploys/674882bbbd4b22000833b4b6 |
Deploy Preview | https://deploy-preview-1760--kleros-v2-neo.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.
Name | Link |
---|---|
Latest commit | 8437b2e51c17058908a27ca56b19894b777a016e |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-testnet-devtools/deploys/674882bbe2d9ba0009ea52d4 |
Deploy Preview | https://deploy-preview-1760--kleros-v2-testnet-devtools.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.
Name | Link |
---|---|
Latest commit | 8437b2e51c17058908a27ca56b19894b777a016e |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-testnet/deploys/674882ba91f0e500084fac31 |
Deploy Preview | https://deploy-preview-1760--kleros-v2-testnet.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.
Code Climate has analyzed commit 8437b2e5 and detected 0 issues on this pull request.
View more on Code Climate.
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
PR-Codex overview
This PR introduces the
ScrollTop
component, which is designed to reset the scroll position to the top of the page. It is integrated into various components and pages throughout the application, enhancing user experience by ensuring smooth navigation.Detailed summary
ScrollTop
component inweb/src/components/ScrollTop.tsx
.ScrollTop
in multiple pages:EmailConfirmation
CaseDetails
Dashboard
Resolver
CourtDetails
AttachmentDisplay
GetPnk
Home
CasesFetcher
useScrollTop
function fromField
component.DisputeCardView
andDisputeListView
to useLink
fromreact-router-dom
.Summary by CodeRabbit
Release Notes
New Features
Improvements
These updates enhance user experience by streamlining navigation and ensuring a smoother transition between views.