Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add comments clarifying potentially confusing terms #7694

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ export type UseTemplateModalProps = Pick<
'onClose' | 'isOpen'
> & { formId: string }

/**
* Note: The word "Use" in "UseTemplateModal" is not referring to React's "use" convention for hooks.
* "UseTemplate" is a FormSG functionality referring to the FormSG feature of utilising another form as a starting template.
*/
export const UseTemplateModal = ({
formId,
isOpen,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ interface UseTemplateWizardProviderProps {
children: React.ReactNode
}

/**
* Note: The word "Use" in "UseTemplateWizardProvider" is not referring to React's "use" convention for hooks.
* "UseTemplate" is a FormSG functionality referring to the FormSG feature of utilising another form as a starting template.
*/
export const UseTemplateWizardProvider = ({
formId,
children,
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/features/admin-form/template/mutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ const useCommonHooks = () => {
}
}

/**
* Note: The word "Use" in "useUseTemplateWizardProvider" is not referring to React's "use" convention for hooks.
* "UseTemplate" is a FormSG functionality referring to the FormSG feature of utilising another form as a starting template.
*/
export const useUseTemplateMutations = () => {
const { handleSuccess, handleError } = useCommonHooks()

Expand Down
Loading