From a113f9c2c01ffeec1edaf5945df9c8178e8f3c83 Mon Sep 17 00:00:00 2001 From: Christopher Kolstad Date: Wed, 30 Nov 2022 10:42:00 +0100 Subject: [PATCH] Change to preferred export format (#2567) ### What This PR updates the example for the hook to use the export format that is recommended in the ADR we've written on export types. --- .../ADRs/front-end/preferred-data-mutation-method.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/website/docs/contributing/ADRs/front-end/preferred-data-mutation-method.md b/website/docs/contributing/ADRs/front-end/preferred-data-mutation-method.md index 2ddec1bfec..90186e795e 100644 --- a/website/docs/contributing/ADRs/front-end/preferred-data-mutation-method.md +++ b/website/docs/contributing/ADRs/front-end/preferred-data-mutation-method.md @@ -17,7 +17,7 @@ Example: import { ITagPayload } from 'interfaces/tags'; import useAPI from '../useApi/useApi'; -const useTagTypesApi = () => { +export const useTagTypesApi = () => { const { makeRequest, createRequest, errors, loading } = useAPI({ propagateErrors: true, }); @@ -87,6 +87,4 @@ const useTagTypesApi = () => { loading, }; }; - -export default useTagTypesApi; ```