fix: fix linting error

This commit is contained in:
Krrish Dholakia 2025-04-22 21:49:25 -07:00
parent 169bb62de8
commit a7881a9bdd

View file

@ -78,6 +78,16 @@ export function UserDataTable({
setSelectedUserId(null);
};
// Update local sorting state when currentSort prop changes
React.useEffect(() => {
if (currentSort) {
setSorting([{
id: currentSort.sortBy,
desc: currentSort.sortOrder === 'desc'
}]);
}
}, [currentSort]);
if (selectedUserId) {
return (
<UserInfoView
@ -89,16 +99,6 @@ export function UserDataTable({
);
}
// Update local sorting state when currentSort prop changes
React.useEffect(() => {
if (currentSort) {
setSorting([{
id: currentSort.sortBy,
desc: currentSort.sortOrder === 'desc'
}]);
}
}, [currentSort]);
return (
<div className="rounded-lg custom-border relative">
<div className="overflow-x-auto">