andoncloud-dashboard-toolkit 1.2.21 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -13,23 +13,23 @@ npm install --save dashboard-toolkit
13
13
  ## Usage
14
14
 
15
15
  ```tsx
16
- import React, { useEffect, useState } from 'react'
16
+ import React, { useEffect, useState } from 'react';
17
17
 
18
- import { GraphQLClient } from 'graphql-request'
18
+ import { GraphQLClient } from 'graphql-request';
19
19
 
20
- import type { User } from 'dashboard-toolkit'
21
- import { getSdk } from 'dashboard-toolkit'
20
+ import type { User } from 'dashboard-toolkit';
21
+ import { getSdk } from 'dashboard-toolkit';
22
22
 
23
23
  const App = () => {
24
- const [users, setUsers] = useState<User[]>([])
25
- const client = new GraphQLClient('http://localhost:4000/graphql')
26
- const sdk = getSdk(client)
24
+ const [users, setUsers] = useState<User[]>([]);
25
+ const client = new GraphQLClient('http://localhost:4000/graphql');
26
+ const sdk = getSdk(client);
27
27
 
28
28
  useEffect(() => {
29
29
  sdk.users().then((data) => {
30
- setUsers(data.users)
31
- })
32
- }, [sdk])
30
+ setUsers(data.users);
31
+ });
32
+ }, [sdk]);
33
33
 
34
34
  return (
35
35
  <div>
@@ -37,10 +37,10 @@ const App = () => {
37
37
  <p key={user.id}>{user.name}</p>
38
38
  ))}
39
39
  </div>
40
- )
41
- }
40
+ );
41
+ };
42
42
 
43
- export default App
43
+ export default App;
44
44
  ```
45
45
 
46
46
  ## License