-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Basic create and read ops for community, posts and comments; Com…
…munity pages
- Loading branch information
Rajat Saxena
committed
Dec 14, 2024
1 parent
3a8f727
commit 0a7bdf8
Showing
121 changed files
with
6,687 additions
and
485 deletions.
There are no files selected for viewing
Binary file added
BIN
+21.4 KB
.yarn/cache/@radix-ui-react-alert-dialog-npm-1.1.2-41415da57f-3d12b86e55.zip
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
16 changes: 16 additions & 0 deletions
16
apps/web/app/dashboard4/(sidebar)/community/[id]/memberships/layout.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { COMMUNITY_MEMBERSHIP_LIST_HEADER } from "@ui-config/strings"; | ||
import type { Metadata, ResolvingMetadata } from "next"; | ||
import { ReactNode } from "react"; | ||
|
||
export async function generateMetadata( | ||
_: any, | ||
parent: ResolvingMetadata, | ||
): Promise<Metadata> { | ||
return { | ||
title: `${COMMUNITY_MEMBERSHIP_LIST_HEADER} | ${(await parent)?.title?.absolute}`, | ||
}; | ||
} | ||
|
||
export default function Layout({ children }: { children: ReactNode }) { | ||
return children; | ||
} |
28 changes: 28 additions & 0 deletions
28
apps/web/app/dashboard4/(sidebar)/community/[id]/memberships/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import DashboardContent from "@components/admin/dashboard-content"; | ||
import { MembershipList } from "@components/community/membership-list"; | ||
import { | ||
COMMUNITY_HEADER, | ||
COMMUNITY_MEMBERSHIP_LIST_HEADER, | ||
} from "@ui-config/strings"; | ||
|
||
export default function Page({ | ||
params, | ||
}: { | ||
params: { | ||
id: string; | ||
}; | ||
}) { | ||
const { id } = params; | ||
const breadcrumbs = [ | ||
{ | ||
label: COMMUNITY_HEADER, | ||
href: `/dashboard4/community/${id}`, | ||
}, | ||
{ label: COMMUNITY_MEMBERSHIP_LIST_HEADER, href: "#" }, | ||
]; | ||
return ( | ||
<DashboardContent breadcrumbs={breadcrumbs}> | ||
<MembershipList id={id} /> | ||
</DashboardContent> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
"use client"; | ||
|
||
import DashboardContent from "@components/admin/dashboard-content"; | ||
import { CommunityForum } from "@components/community"; | ||
import { COMMUNITY_HEADER } from "@ui-config/strings"; | ||
import { useSearchParams } from "next/navigation"; | ||
|
||
const breadcrumbs = [{ label: COMMUNITY_HEADER, href: "#" }]; | ||
|
||
export default function Page({ params }: { params: { id: string } }) { | ||
const { id } = params; | ||
const searchParams = useSearchParams(); | ||
const category = searchParams?.get("category") || "All"; | ||
|
||
return ( | ||
<DashboardContent breadcrumbs={breadcrumbs}> | ||
<CommunityForum id={id} activeCategory={category} /> | ||
</DashboardContent> | ||
); | ||
} |
Oops, something went wrong.