mirror of
https://github.com/Kong/insomnia.git
synced 2026-06-02 13:19:21 -04:00
fix(GitRemoteBranchSelect): update fetcher key to use deferred URL value (#8905)
This commit is contained in:
@@ -14,11 +14,11 @@ export const GitRemoteBranchSelect = ({
|
||||
isDisabled: boolean;
|
||||
credentials: GitCredentials;
|
||||
}) => {
|
||||
const remoteBranchesFetcher = useFetcher<{ branches: string[] }>({ key: url || 'branch-select' });
|
||||
const uri = useDeferredValue(url);
|
||||
const remoteBranchesFetcher = useFetcher<{ branches: string[] }>({ key: `branch-select:${uri}` });
|
||||
const { organizationId } = useParams<{ organizationId: string }>();
|
||||
|
||||
const isLoadingRemoteBranches = remoteBranchesFetcher.state !== 'idle';
|
||||
const uri = useDeferredValue(url);
|
||||
|
||||
useEffect(() => {
|
||||
if (uri && remoteBranchesFetcher.state === 'idle' && !remoteBranchesFetcher.data) {
|
||||
|
||||
Reference in New Issue
Block a user