Skip to content

Commit

Permalink
Change custom hook name
Browse files Browse the repository at this point in the history
  • Loading branch information
shironegi39 committed Sep 12, 2024
1 parent 7795fd5 commit ada4bba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions apps/app/src/client/components/Admin/G2GDataTransfer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { useGenerateTransferKey } from '~/client/services/g2g-transfer';
import { apiv3Get, apiv3Post } from '~/client/util/apiv3-client';
import { toastError, toastSuccess } from '~/client/util/toastr';
import { G2G_PROGRESS_STATUS, type G2GProgress } from '~/interfaces/g2g-transfer';
import { useGrowiHelpUrl } from '~/stores-universal/context';
import { useGrowiHelpDomain } from '~/stores-universal/context';
import { useAdminSocket } from '~/stores/socket-io';

import CustomCopyToClipBoard from '../Common/CustomCopyToClipBoard';
Expand Down Expand Up @@ -124,7 +124,7 @@ const G2GDataTransfer = (): JSX.Element => {
}
}, [setTransferring, startTransferKey, selectedCollections, optionsMap]);

const { data: growiHelpDomain } = useGrowiHelpUrl();
const { data: growiHelpDomain } = useGrowiHelpDomain();

// File upload
// const onChangeFileUploadTypeHandler = useCallback((e: ChangeEvent, type: string) => {
Expand Down
4 changes: 2 additions & 2 deletions apps/app/src/client/components/DataTransferForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import React from 'react';
import { useTranslation } from 'next-i18next';

import { useGenerateTransferKey } from '~/client/services/g2g-transfer';
import { useGrowiHelpUrl } from '~/stores-universal/context';
import { useGrowiHelpDomain } from '~/stores-universal/context';

import CustomCopyToClipBoard from './Common/CustomCopyToClipBoard';

const DataTransferForm = (): JSX.Element => {
const { t } = useTranslation('commons');
const { transferKey, generateTransferKey } = useGenerateTransferKey();
const { data: growiHelpDomain } = useGrowiHelpUrl();
const { data: growiHelpDomain } = useGrowiHelpDomain();

return (
<div data-testid="installerForm" className="py-3 px-4">
Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/stores-universal/context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ export const useAcceptedUploadFileType = (): SWRResponse<AcceptedUploadFileType,
);
};

export const useGrowiHelpUrl = (): SWRResponse<'growi.cloud/help' | 'docs.growi.org', Error> => {
export const useGrowiHelpDomain = (): SWRResponse<'growi.cloud/help' | 'docs.growi.org', Error> => {
const { data: growiCloudUri } = useGrowiCloudUri();
const { data: growiAppIdForGrowiCloud } = useGrowiAppIdForGrowiCloud();

Expand Down

0 comments on commit ada4bba

Please sign in to comment.