Skip to content

Commit

Permalink
spinner on pagechange
Browse files Browse the repository at this point in the history
  • Loading branch information
shema-surge committed Jul 25, 2024
1 parent e0fcd49 commit df47b62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Pages/AdminDashboard/AdminDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ function AdminDashboard() {
const { id } = useParams<{ id?: string | undefined}>();

useEffect(() => {
setSpinnerActive(prev=>!prev)
async function getUsers() {
const response = await axios.get(`${process.env.BACKEND_URL}/api/users?page=${userPage}&rowsPerPage=5`,
const response = await axios.get(`${process.env.BACKEND_URL}/api/users?page=${userPage}&rowsPerPage=2`,
{
headers: {
'authorization': `Bearer ${token}`
Expand Down

0 comments on commit df47b62

Please sign in to comment.