Skip to content

Commit

Permalink
Merge pull request #49 from AudiusProject/jowlee-fix-dashboard-scroll…
Browse files Browse the repository at this point in the history
…-lock

Fix dashboard scroll lock
  • Loading branch information
jowlee authored and michellebrier committed Oct 9, 2023
1 parent 6a3f404 commit 0c3f0ea
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
6 changes: 3 additions & 3 deletions packages/protocol-dashboard/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/protocol-dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"dependencies": {
"@audius/libs": "1.1.5",
"@audius/stems": "^0.3.3",
"@audius/stems": "0.3.4",
"@reduxjs/toolkit": "^1.4.0",
"chart.js": "^2.9.3",
"clsx": "^1.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,11 @@ const DelegatesModal: React.FC<DelegatesModalProps> = ({

const pushRoute = usePushRoute()
const onRowClick = useCallback(
(row: Delegator) => pushRoute(accountPage(row.address)),
[pushRoute]
(row: Delegator) => {
onClose()
pushRoute(accountPage(row.address))
},
[onClose, pushRoute]
)

if (data.length === 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,10 @@ const DelegatorsTable: React.FC<DelegatorsTableProps> = ({
const pushRoute = usePushRoute()
const onRowClick = useCallback(
(row: Delegator) => {
onClose()
pushRoute(accountPage(row.address))
},
[pushRoute]
[onClose, pushRoute]
)

const renderTableRow = (data: Delegator) => {
Expand Down

0 comments on commit 0c3f0ea

Please sign in to comment.