Add favorite functionality
This commit is contained in:
1 parent
068847af08
commit
be02cc59ea
2 files changed
+2
-2
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user