Skip to content

Commit dd77100

Browse files
committed
update readme
1 parent 86d8bd7 commit dd77100

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const authAdminEndpoint = 'https://api-admin-endpoint.com';
2727
const CheckForNetworkStatusCodeAnd = () => {
2828
const { networkStatusCode, clearStatus } = useNetworkStatus({
2929
urls: [authUserEndpoint, authAdminEndpoint]
30-
});
30+
}); // accepts an array of urls through the urls properties
3131

3232
if (
3333
networkStatusCode[authUserEndpoint] === 401 ||
@@ -49,6 +49,11 @@ const CheckForNetworkStatusCodeAnd = () => {
4949
};
5050
```
5151

52+
| Return Value | description |
53+
| ----------------- | --------------------------------------------------------------------------------------------------------------------------- |
54+
| networkStatusCode | an object that contains the status code of the urls. The status code of each url can be accessed via networkStatusCode[url] |
55+
| clearStatus | accepts an array of urls. It resets the statusCode of the urls passed |
56+
5257
## License
5358

5459
MIT © [calebdeji](https://github.com/calebdeji)

0 commit comments

Comments
 (0)