File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ const authAdminEndpoint = 'https://api-admin-endpoint.com';
2727const 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
5459MIT © [ calebdeji] ( https://github.com/calebdeji )
You can’t perform that action at this time.
0 commit comments