Skip to content

Commit

Permalink
chore: add comments clarifying potentially confusing terms (#7694)
Browse files Browse the repository at this point in the history
* chore: add comments clarifying potentially confusing terms

* feat: remove undocumented param and return

---------

Co-authored-by: Kevin Foong <[email protected]>
  • Loading branch information
KenLSM and kevin9foong authored Sep 25, 2024
1 parent df2e6b8 commit 320cbd7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
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

0 comments on commit 320cbd7

Please sign in to comment.