-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to archive groups when they’re settled up #45
Ability to archive groups when they’re settled up #45
Conversation
@acuteengle is attempting to deploy a commit to the Sebastien Castiel Team on Vercel. A member of the Team first needs to authorize it. |
src/app/groups/recent-group-list.tsx
Outdated
)} | ||
</span> | ||
<div className="w-full flex items-center justify-between mt-2"> | ||
{groupIsSettledUp && <div className="flex items-center"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional icon if group is settled up
? state.groupsDetails.find((d) => d.id === group.id) | ||
: null | ||
return ( | ||
<li key={group.id}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File was getting pretty big so I just moved this into its own component RecentGroupListCard
so that I could re-use it for the different group lists
@@ -64,3 +66,28 @@ export function unstarGroup(groupId: string) { | |||
JSON.stringify(starredGroups.filter((g) => g !== groupId)), | |||
) | |||
} | |||
|
|||
export function getArchivedGroups() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These helpers are basically the same as the "starredGroups" ones
Thanks @acuteengle, amazing job 👍 I update your PR to fix a couple of TypeScript issues. I also added a title at the top of each section (Starred groups, Recent groups, Archived groups), I think the page looks better this way! |
|
||
const details = | ||
state.status === 'complete' | ||
? state.groupsDetails.find((d) => d.id === group.id) | ||
: null | ||
|
||
if (state.status === 'pending') return null | ||
|
||
const refreshGroupsFromStorage = () => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oooh this is nice 💪🏻
</> | ||
)} | ||
</> | ||
) | ||
} | ||
|
||
function GroupList({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even better 🎉
Quick implementation for idea 1 in #44Demo: https://www.loom.com/share/760c75995df94df1bdc91205631e365e?sid=5959bc98-c2a5-4332-8f2f-50f551611d05Also happy to discuss alternative ideas for how to achieve "Indication of "Settled up" groups"V2 with groupings of groups: https://www.loom.com/share/1c7edc686d0d43b5a01d3f467438def1