diff --git a/client/src/components/LaunchLink.tsx b/client/src/components/LaunchLink.tsx index 3f739ef4..7fe8e754 100644 --- a/client/src/components/LaunchLink.tsx +++ b/client/src/components/LaunchLink.tsx @@ -41,7 +41,7 @@ export default function LaunchLink(props: Props) { publicToken: string | null, metadata: PlaidLinkOnSuccessMetadata ) => { - // log and save metatdata + // log and save metadata logSuccess(metadata, props.userId); if (props.itemId != null) { // update mode: no need to exchange public token @@ -68,7 +68,7 @@ export default function LaunchLink(props: Props) { error: PlaidLinkError | null, metadata: PlaidLinkOnExitMetadata ) => { - // log and save error and metatdata + // log and save error and metadata logExit(error, metadata, props.userId); if (error != null && error.error_code === 'INVALID_LINK_TOKEN') { await generateLinkToken(props.userId, props.itemId); @@ -98,13 +98,13 @@ export default function LaunchLink(props: Props) { }; if (props.isOauth) { - config.receivedRedirectUri = window.location.href; // add additional receivedRedirectUri config when handling an OAuth reidrect + config.receivedRedirectUri = window.location.href; // add additional receivedRedirectUri config when handling an OAuth redirect } const { open, ready } = usePlaidLink(config); useEffect(() => { - // initiallizes Link automatically + // initializes Link automatically if (props.isOauth && ready) { open(); } else if (ready) { diff --git a/client/src/services/currentUser.tsx b/client/src/services/currentUser.tsx index 6fc6658c..bf885a9f 100644 --- a/client/src/services/currentUser.tsx +++ b/client/src/services/currentUser.tsx @@ -138,7 +138,7 @@ export default function useCurrentUser() { const context = useContext(CurrentUserContext); if (!context) { - throw new Error(`useUsers must be used within a UsersProvider`); + throw new Error(`useCurrentUser must be used within a CurrentUserProvider`); } return context; diff --git a/client/src/services/items.tsx b/client/src/services/items.tsx index 1a01e920..c0863cf6 100644 --- a/client/src/services/items.tsx +++ b/client/src/services/items.tsx @@ -77,7 +77,7 @@ export function ItemsProvider(props: any) { }, []); /** - * @desc Will deletes Item by itemId. + * @desc Will delete Item by itemId. */ const deleteItemById = useCallback( async (id, userId) => { diff --git a/client/src/services/transactions.tsx b/client/src/services/transactions.tsx index d795a65d..e73b084c 100644 --- a/client/src/services/transactions.tsx +++ b/client/src/services/transactions.tsx @@ -102,7 +102,7 @@ export function TransactionsProvider(props: any) { }, []); /** - * @desc Will Delete all transactions that belong to an individual Item. + * @desc Will delete all transactions that belong to an individual Item. * There is no api request as apiDeleteItemById in items delete all related transactions */ const deleteTransactionsByItemId = useCallback(itemId => { @@ -110,7 +110,7 @@ export function TransactionsProvider(props: any) { }, []); /** - * @desc Will Delete all transactions that belong to an individual User. + * @desc Will delete all transactions that belong to an individual User. * There is no api request as apiDeleteItemById in items delete all related transactions */ const deleteTransactionsByUserId = useCallback(userId => {