Skip to content

Commit

Permalink
Add favorite functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
kamranahmedse committed Nov 12, 2023
1 parent 068847a commit be02cc5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Friends/FriendsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { FriendProgressItem } from './FriendProgressItem';
import { UserProgressModal } from '../UserProgress/UserProgressModal';
import { InviteFriendPopup } from './InviteFriendPopup';
import { UserCustomProgressModal } from '../UserProgress/UserCustomProgressModal';
import {UserIcon} from "lucide-react";
import { UserIcon } from 'lucide-react';

type FriendResourceProgress = {
updatedAt: string;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/resource-progress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export async function getResourceProgress(

const userId = getUser()?.id;
const progressKey = `${resourceType}-${resourceId}-${userId}-progress`;
const isFavoriteKey = `${resourceType}-${resourceId}-${userId}-favorite`;
const isFavoriteKey = `${resourceType}-${resourceId}-favorite`;

const rawIsFavorite = localStorage.getItem(isFavoriteKey);
const isFavorite = JSON.parse(rawIsFavorite || '0') === 1;
Expand Down

0 comments on commit be02cc5

Please sign in to comment.