diff options
Diffstat (limited to 'src/app/groups/recent-groups-helpers.ts')
| -rw-r--r-- | src/app/groups/recent-groups-helpers.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/app/groups/recent-groups-helpers.ts b/src/app/groups/recent-groups-helpers.ts index 5ccb5ae..72c5d28 100644 --- a/src/app/groups/recent-groups-helpers.ts +++ b/src/app/groups/recent-groups-helpers.ts @@ -32,6 +32,14 @@ export function saveRecentGroup(group: RecentGroup) { ) } +export function deleteRecentGroup(group: RecentGroup) { + const recentGroups = getRecentGroups() + localStorage.setItem( + STORAGE_KEY, + JSON.stringify(recentGroups.filter((rg) => rg.id !== group.id)), + ) +} + export function getStarredGroups() { const starredGroupsJson = localStorage.getItem(STARRED_GROUPS_STORAGE_KEY) const starredGroupsRaw = starredGroupsJson |
