Add favorite functionality

pull/4696/head
Kamran Ahmed 1 year ago
parent 068847af08
commit be02cc59ea
  1. 2
      src/components/Friends/FriendsPage.tsx
  2. 2
      src/lib/resource-progress.ts

@ -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;

@ -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;

Loading…
Cancel
Save