diff --git a/app/[domain]/(blank)/community/featured-hubs/page.tsx b/app/[domain]/(blank)/community/featured-hubs/page.tsx index ccf4bf64f..03349c48e 100644 --- a/app/[domain]/(blank)/community/featured-hubs/page.tsx +++ b/app/[domain]/(blank)/community/featured-hubs/page.tsx @@ -19,5 +19,9 @@ export default async function FeaturedHubs({ params }: Props) { const { data: subSpacesData } = await client.query({ query: GetSubSpacesDocument, variables: { id: space._id } }); const subSpaces = subSpacesData?.getSubSpaces || []; - return ; + return ( +
+ +
+ ); } diff --git a/app/[domain]/(blank)/community/music/page.tsx b/app/[domain]/(blank)/community/music/page.tsx new file mode 100644 index 000000000..99e6a051b --- /dev/null +++ b/app/[domain]/(blank)/community/music/page.tsx @@ -0,0 +1,26 @@ +import { HubMusicPlayer } from '$lib/components/features/community/HubMusicPlayer'; +import { Space } from '$lib/graphql/generated/backend/graphql'; +import { getClient } from '$lib/graphql/request'; +import { isObjectId } from '$lib/utils/helpers'; +import { notFound } from 'next/navigation'; + +export default async function Page({ params }: { params: Promise<{ uid: string }> }) { + const uid = (await params).uid; + const variables = isObjectId(uid) ? { id: uid, slug: uid } : { slug: uid }; + + const client = getClient(); + const { data, error } = await client.query({ + query: `query GetSpace($id: MongoID, $slug: String, $hostname: String) { + getSpace(_id: $id, slug: $slug, hostname: $hostname) { + _id + nft_enabled + } + }`, + variables, + }); + const space = data?.getSpace as Space; + + if (!space?._id || !space?.nft_enabled) return notFound(); + + return ; +} diff --git a/app/[domain]/(blank)/community/page.tsx b/app/[domain]/(blank)/community/page.tsx index 4e1a188e6..5f847ee30 100644 --- a/app/[domain]/(blank)/community/page.tsx +++ b/app/[domain]/(blank)/community/page.tsx @@ -46,5 +46,11 @@ export default async function Page({ params }: Props) { if (!space) return notFound(); - return ; + // const { subSpaces, spaceTags } = await prefetchData(space); + + return ( +
+ +
+ ); } diff --git a/app/[domain]/(blank)/s/[uid]/featured-hubs/page.tsx b/app/[domain]/(blank)/s/[uid]/featured-hubs/page.tsx index 93d0fa73a..c3645f69d 100644 --- a/app/[domain]/(blank)/s/[uid]/featured-hubs/page.tsx +++ b/app/[domain]/(blank)/s/[uid]/featured-hubs/page.tsx @@ -1,20 +1,24 @@ -import { getClient } from "$lib/graphql/request"; +import { getClient } from '$lib/graphql/request'; import { isObjectId } from '$lib/utils/helpers'; import { GetSubSpacesDocument, PublicSpace } from '$lib/graphql/generated/backend/graphql'; -import SubCommunity from "$lib/components/features/sub-community"; -import { getSpace } from "$lib/utils/getSpace"; +import SubCommunity from '$lib/components/features/sub-community'; +import { getSpace } from '$lib/utils/getSpace'; -export default async function FeaturedHubs({ params }: { params: Promise<{ uid: string; }>; }) { +export default async function FeaturedHubs({ params }: { params: Promise<{ uid: string }> }) { const uid = (await params).uid; const variables = isObjectId(uid) ? { id: uid, slug: uid } : { slug: uid }; - const space = await getSpace(variables); - const { data: subSpacesData } = await getClient().query({ query: GetSubSpacesDocument, variables: { id: space._id } }); + const { data: subSpacesData } = await getClient().query({ + query: GetSubSpacesDocument, + variables: { id: space._id }, + }); const subSpaces = subSpacesData?.getSubSpaces || []; return ( - +
+ +
); -}; +} diff --git a/app/[domain]/(blank)/s/[uid]/music/page.tsx b/app/[domain]/(blank)/s/[uid]/music/page.tsx new file mode 100644 index 000000000..f18de6c68 --- /dev/null +++ b/app/[domain]/(blank)/s/[uid]/music/page.tsx @@ -0,0 +1,26 @@ +import { HubMusicPlayer } from '$lib/components/features/community/HubMusicPlayer'; +import { Space } from '$lib/graphql/generated/backend/graphql'; +import { getClient } from '$lib/graphql/request'; +import { isObjectId } from '$lib/utils/helpers'; +import { notFound } from 'next/navigation'; + +export default async function Page({ params }: { params: Promise<{ uid: string }> }) { + const uid = (await params).uid; + const variables = isObjectId(uid) ? { id: uid, slug: uid } : { slug: uid }; + + const client = getClient(); + const { data, error } = await client.query({ + query: `query GetSpace($id: MongoID, $slug: String, $hostname: String) { + getSpace(_id: $id, slug: $slug, hostname: $hostname) { + _id + nft_enabled + } + }`, + variables, + }); + const space = data?.getSpace as Space; + + if (!space?._id || !space?.nft_enabled) return notFound(); + + return ; +} diff --git a/app/[domain]/(blank)/s/[uid]/page.tsx b/app/[domain]/(blank)/s/[uid]/page.tsx index 2bbfd6a94..fb736d937 100644 --- a/app/[domain]/(blank)/s/[uid]/page.tsx +++ b/app/[domain]/(blank)/s/[uid]/page.tsx @@ -22,7 +22,11 @@ export default async function Page({ params }: { params: Promise<{ uid: string } // const { subSpaces, spaceTags } = await prefetchData(space); - return ; + return ( +
+ +
+ ); } // const prefetchData = async (space: Space) => { diff --git a/app/[domain]/(blank)/s/[uid]/timeline/[slug]/page.tsx b/app/[domain]/(blank)/s/[uid]/timeline/[slug]/page.tsx index 86703b5e2..e3ecd0e87 100644 --- a/app/[domain]/(blank)/s/[uid]/timeline/[slug]/page.tsx +++ b/app/[domain]/(blank)/s/[uid]/timeline/[slug]/page.tsx @@ -12,5 +12,9 @@ export default async function Page({ params }: { params: Promise<{ uid: string; if (!space?.lens_feed_id || !postSlug) return notFound(); - return ; + return ( +
+ +
+ ); } diff --git a/app/[domain]/(blank)/s/[uid]/timeline/page.tsx b/app/[domain]/(blank)/s/[uid]/timeline/page.tsx index 73464d2de..2dc8e03f2 100644 --- a/app/[domain]/(blank)/s/[uid]/timeline/page.tsx +++ b/app/[domain]/(blank)/s/[uid]/timeline/page.tsx @@ -13,9 +13,11 @@ export default async function Page({ params }: { params: Promise<{ uid: string } if (!space?.lens_feed_id) return notFound(); return ( -
- - +
+
+ + +
); } diff --git a/app/[domain]/(blank)/s/lemonheads/events/page.tsx b/app/[domain]/(blank)/s/lemonheads/events/page.tsx index c2e6b4d8a..54e722f46 100644 --- a/app/[domain]/(blank)/s/lemonheads/events/page.tsx +++ b/app/[domain]/(blank)/s/lemonheads/events/page.tsx @@ -25,17 +25,19 @@ export default async function Page(_props: { params: Promise<{ uid: string }> }) const { subSpaces, spaceTags } = await prefetchData(space); return ( -
-
-
- Events - - Discover gatherings, meetups, and more from this community. Jump into what excites you. - +
+
+
+
+ Events + + Discover gatherings, meetups, and more from this community. Jump into what excites you. + +
-
- + +
); } diff --git a/app/[domain]/(blank)/s/lemonheads/featured-hubs/page.tsx b/app/[domain]/(blank)/s/lemonheads/featured-hubs/page.tsx index 6fedf3ba5..838660b40 100644 --- a/app/[domain]/(blank)/s/lemonheads/featured-hubs/page.tsx +++ b/app/[domain]/(blank)/s/lemonheads/featured-hubs/page.tsx @@ -18,15 +18,17 @@ async function Page() { const subSpaces = (subSpacesData?.getSubSpaces || []) as PublicSpace[]; return ( -
-
- Featured Hubs - - A closer look at all the hubs linked to this community. Discover new events, people, and ideas. - -
+
+
+
+ Featured Hubs + + A closer look at all the hubs linked to this community. Discover new events, people, and ideas. + +
- + +
); } diff --git a/app/[domain]/(blank)/s/lemonheads/layout.tsx b/app/[domain]/(blank)/s/lemonheads/layout.tsx index 22ad8fc83..48e2ddcf7 100644 --- a/app/[domain]/(blank)/s/lemonheads/layout.tsx +++ b/app/[domain]/(blank)/s/lemonheads/layout.tsx @@ -60,9 +60,7 @@ async function Layout({ children }: React.PropsWithChildren) {
-
-
{children}
-
+
{children}