mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-01 06:50:26 +02:00
Add favorite functionality
This commit is contained in:
@@ -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