diff --git a/apps/dashboard/src/@/components/pagination-buttons.stories.tsx b/apps/dashboard/src/@/components/pagination-buttons.stories.tsx index 401598d7241..a04b882abe3 100644 --- a/apps/dashboard/src/@/components/pagination-buttons.stories.tsx +++ b/apps/dashboard/src/@/components/pagination-buttons.stories.tsx @@ -25,7 +25,8 @@ function Story() {
- + +
diff --git a/apps/dashboard/src/@/components/pagination-buttons.tsx b/apps/dashboard/src/@/components/pagination-buttons.tsx index a8142024279..0e64602da1d 100644 --- a/apps/dashboard/src/@/components/pagination-buttons.tsx +++ b/apps/dashboard/src/@/components/pagination-buttons.tsx @@ -48,6 +48,7 @@ export const PaginationButtons = (props: { { setPage(activePage - 1); @@ -56,6 +57,7 @@ export const PaginationButtons = (props: { { setPage(activePage + 1); @@ -76,6 +78,7 @@ export const PaginationButtons = (props: { {pages.map((page) => ( { setPage(page); @@ -95,6 +98,7 @@ export const PaginationButtons = (props: { { setPage(activePage - 1); @@ -107,6 +111,7 @@ export const PaginationButtons = (props: { <> { setPage(1); }} @@ -116,7 +121,7 @@ export const PaginationButtons = (props: { - + )} @@ -124,6 +129,7 @@ export const PaginationButtons = (props: { {activePage - 1 > 0 && ( { setPage(activePage - 1); }} @@ -134,12 +140,15 @@ export const PaginationButtons = (props: { )} - {activePage} + + {activePage} + {activePage + 1 <= totalPages && ( { setPage(activePage + 1); }} @@ -153,11 +162,12 @@ export const PaginationButtons = (props: { {activePage + 3 <= totalPages && ( <> - + { setPage(totalPages); }} @@ -170,6 +180,7 @@ export const PaginationButtons = (props: { { setPage(activePage + 1); @@ -180,7 +191,7 @@ export const PaginationButtons = (props: {
{ @@ -197,7 +208,7 @@ export const PaginationButtons = (props: { value={pageNumberInput} /> +
+ +
+ {changelog.map((item) => ( +
+ {item.title} +
+ +
+
+ } + src={item.feature_image} + /> -
- - {item.title} - -
- {formatDistance(new Date(item.published_at), Date.now(), { - addSuffix: true, - })} +
+ + {item.title} + + +
+ {formatDistance(new Date(item.published_at), Date.now(), { + addSuffix: true, + })} +
-
- ))} - - View More - + ))} +
); } @@ -49,7 +86,7 @@ export async function Changelog() { const getChangelog = unstable_cache( async () => { const res = await fetch( - "https://thirdweb.ghost.io/ghost/api/content/posts/?key=49c62b5137df1c17ab6b9e46e3&fields=title,url,published_at&filter=tag:changelog&visibility:public&limit=10", + "https://thirdweb.ghost.io/ghost/api/content/posts/?key=49c62b5137df1c17ab6b9e46e3&fields=title,url,published_at,feature_image&filter=tag:changelog&visibility:public&limit=12", ); if (!res.ok) { return []; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/_components/invite-team-members-button.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/_components/invite-team-members-button.tsx index a9d9c777526..ac578f50612 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/_components/invite-team-members-button.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/_components/invite-team-members-button.tsx @@ -6,7 +6,7 @@ import { Button } from "@/components/ui/button"; export function InviteTeamMembersButton(props: { teamSlug: string }) { return ( - {/* Projects Table */} {paginatedProjects.length === 0 ? ( searchTerm !== "" ? ( -
+

No projects found

) : ( -
+

No projects created

) ) : ( -
- +
+ @@ -242,44 +265,16 @@ export function TeamProjectsPage(props: { ); } -function SearchInput(props: { - value: string; - onValueChange: (value: string) => void; -}) { - return ( -
- props.onValueChange(e.target.value)} - placeholder="Project name or Client ID" - value={props.value} - /> - -
- ); -} - -function AddNewButton(props: { - createProject: () => void; - teamMembersSettingsPath: string; -}) { - return ( - - ); -} +const sortByIcon: Record> = { + createdAt: CalendarIcon, + monthlyActiveUsers: UsersIcon, + name: LetterTextIcon, +}; -function SelectBy(props: { - value: SortById; - onChange: (value: SortById) => void; +function SortDropdown(props: { + sortBy: SortById; + onSortChange: (value: SortById) => void; + hasActiveFilters: boolean; }) { const values: SortById[] = ["name", "createdAt", "monthlyActiveUsers"]; const valueToLabel: Record = { @@ -289,25 +284,49 @@ function SelectBy(props: { }; return ( - + + + + + + props.onSortChange(v as SortById)} + value={props.sortBy} + > + {values.map((value) => { + const Icon = sortByIcon[value]; + return ( + props.onSortChange(value)} + > +
+ + {valueToLabel[value]} +
+ + {props.sortBy === value ? ( + + ) : ( +
+ )} + + ); + })} + + + ); }