Update packages/cli/templates/default-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.tsx.hbs
Co-authored-by: Johan Haals <johan@haals.se> Signed-off-by: PIYUSH NEGI <43876655+npiyush97@users.noreply.github.com>
This commit is contained in:
+2
-3
@@ -290,9 +290,8 @@ export const DenseTable = ({ users }: DenseTableProps) => {
|
||||
export const ExampleFetchComponent = () => {
|
||||
|
||||
const { value, loading, error } = useAsync(async (): Promise<User[]> => {
|
||||
const response = exampleUsers;
|
||||
const data = response.results;
|
||||
return data;
|
||||
// Would use fetch in a real world example
|
||||
return exampleUsers.results;
|
||||
}, []);
|
||||
|
||||
if (loading) {
|
||||
|
||||
Reference in New Issue
Block a user