e2corporation commented on code in PR #2928:
URL: https://github.com/apache/incubator-devlake/pull/2928#discussion_r962727178


##########
config-ui/src/hooks/useConnectionManager.jsx:
##########
@@ -42,15 +43,13 @@ function useConnectionManager (
 
   const [provider, setProvider] = useState(activeProvider)
   const [name, setName] = useState()
+  // @todo: refactor to endpoint and setEndpoint
   const [endpointUrl, setEndpointUrl] = useState()
   const [proxy, setProxy] = useState()
-  const [rateLimit, setRateLimit] = useState(0)
+  const [rateLimitPerHour, setRateLimitPerHour] = useState(0)
   const [token, setToken] = useState()
-  const [initialTokenStore, setInitialTokenStore] = useState({
-    0: '',
-    1: '',
-    2: ''
-  })
+  const defaultTokenStore = useMemo(() => ({ 0: '', 1: '', 2: '' }), [])

Review Comment:
   Meaningless feedback. It's a memo with no compute dependencies at the 
moment, so the const can be defined in the component.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to