Skip to content

Commit

Permalink
[cleanup] more.
Browse files Browse the repository at this point in the history
  • Loading branch information
ronniebeggs committed Jun 9, 2024
1 parent 0dc0a54 commit 6d575e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/context/AuthContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import React, {
import supabaseAdmin from '../supabase/createAdminClient';
import supabase from '../supabase/createClient';
import { removePushToken } from '../supabase/pushNotifications';
import { UserUid } from '../types/types';

/**
* To use AuthContext, import useSession() in whichever file you prefer.
Expand Down
8 changes: 3 additions & 5 deletions src/supabase/pushNotifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export async function registerForPushNotifications(): Promise<string> {
/**
* Update the user's expo push token. If it already exists, overwrite the value with the provided token.
*
* @param userId Target user that we won't to associate the token with.
* @param userId Target user that we want to associate the token with.
* @param token Expo push token used as a device address for sending push notifications.
*/
export async function updatePushToken(userId: UserUid, token: string) {
Expand All @@ -63,10 +63,8 @@ export async function updatePushToken(userId: UserUid, token: string) {
}

/**
* Update the user's expo push token. If it already exists, overwrite the value with the provided token.
*
* @param userId Target user that we won't to associate the token with.
* @param token Expo push token used as a device address for sending push notifications.
* Remove the user's expo push token to prevent users from recieving notification after signing out.
* @param userId Target user whose token we want to remove.
*/
export async function removePushToken(userId: string) {
try {
Expand Down

0 comments on commit 6d575e4

Please sign in to comment.