react pagination with hooks