Skip to content
Open
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
8 changes: 4 additions & 4 deletions client/src/components/LaunchLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion client/src/services/currentUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion client/src/services/items.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
4 changes: 2 additions & 2 deletions client/src/services/transactions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ 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 => {
dispatch({ type: 'DELETE_BY_ITEM', payload: itemId });
}, []);

/**
* @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 => {
Expand Down