♻️ Rename ambgious hooks

Two different hooks and one store property shared the same name. This commit resolves the ambiguity and makes all names unique
This commit is contained in:
Philipp Stracker 2025-01-02 17:43:02 +01:00
parent 565ee96bb6
commit 084327c635
No known key found for this signature in database
3 changed files with 5 additions and 5 deletions

View file

@ -14,7 +14,7 @@ import Separator from '../../../ReusableComponents/Separator';
import DataStoreControl from '../../../ReusableComponents/DataStoreControl';
import {
useSandboxConnection,
useManualConnection,
useDirectAuthentication,
} from '../../../../hooks/useHandleConnections';
import ConnectionButton from './ConnectionButton';
import BusyStateWrapper from '../../../ReusableComponents/BusyStateWrapper';
@ -47,7 +47,7 @@ const AdvancedOptionsForm = () => {
setClientId,
clientSecret,
setClientSecret,
} = useManualConnection();
} = useDirectAuthentication();
const refClientId = useRef( null );
const refClientSecret = useRef( null );

View file

@ -97,7 +97,7 @@ export const useProduction = () => {
return { productionOnboardingUrl };
};
export const useManualConnection = () => {
export const useAuthentication = () => {
const {
isManualConnectionMode,
setManualConnectionMode,

View file

@ -189,7 +189,7 @@ export const useSandboxConnection = () => {
};
};
export const useManualConnection = () => {
export const useDirectAuthentication = () => {
const { handleFailed, handleCompleted, createErrorNotice } =
useConnectionBase();
const { withActivity } = CommonHooks.useBusyState();
@ -201,7 +201,7 @@ export const useManualConnection = () => {
setClientId,
clientSecret,
setClientSecret,
} = CommonHooks.useManualConnection();
} = CommonHooks.useAuthentication();
const handleConnectViaIdAndSecret = async ( { validation } = {} ) => {
return withActivity(