forked from all-in-aigc/melodisco
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
591 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
"use client"; | ||
|
||
import { usePathname } from "next/navigation"; | ||
|
||
export default function ({ type }: { type: string }) { | ||
const pathname = usePathname(); | ||
|
||
return ( | ||
<div role="tablist" className="tabs tabs-boxed mt-2"> | ||
<a | ||
href={`/${type}`} | ||
className={`tab ${ | ||
pathname.endsWith(type) ? "bg-primary text-base-content" : "" | ||
}`} | ||
> | ||
All | ||
</a> | ||
<a | ||
href={`/${type}/suno-ai-songs`} | ||
className={`tab ${ | ||
pathname.endsWith("suno-ai-songs") | ||
? "bg-primary text-base-content" | ||
: "" | ||
}`} | ||
> | ||
Suno AI Songs | ||
</a> | ||
<a | ||
href={`/${type}/udio-ai-songs`} | ||
className={`tab ${ | ||
pathname.endsWith("udio-ai-songs") | ||
? "bg-primary text-base-content" | ||
: "" | ||
}`} | ||
> | ||
Udio AI Songs | ||
</a> | ||
</div> | ||
); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import Crumb from "../../_components/crumb"; | ||
import { Metadata } from "next"; | ||
import { Nav } from "@/types/nav"; | ||
import Playlist from "../../_components/playlist"; | ||
import Tab from "../../_components/tab"; | ||
import { getProviderLatestSongs } from "@/models/song"; | ||
import { getTranslations } from "next-intl/server"; | ||
|
||
export const maxDuration = 120; | ||
|
||
export async function generateMetadata({ | ||
params, | ||
}: { | ||
params: { locale: string }; | ||
}): Promise<Metadata> { | ||
const t = await getTranslations("metadata"); | ||
|
||
return { | ||
title: `Newest Suno AI Songs | ${t("newest_title")}`, | ||
description: `Newest Suno AI Songs | ${t("newest_description")}`, | ||
alternates: { | ||
canonical: `${process.env.NEXTAUTH_URL}/${ | ||
params.locale !== "en" ? params.locale + "/" : "" | ||
}newest/suno-ai-songs`, | ||
}, | ||
}; | ||
} | ||
|
||
export default async function ({}) { | ||
const t = await getTranslations("nav"); | ||
const songs = await getProviderLatestSongs("suno", 1, 50); | ||
const loading = false; | ||
|
||
const crumbNavs: Nav[] = [ | ||
{ | ||
title: t("home"), | ||
url: "/", | ||
}, | ||
{ | ||
title: t("newest"), | ||
url: "/newest", | ||
}, | ||
{ | ||
title: "Suno AI Songs", | ||
active: true, | ||
}, | ||
]; | ||
|
||
return ( | ||
<div> | ||
<Crumb navs={crumbNavs} /> | ||
|
||
<div className="flex items-center justify-between mb-4"> | ||
<div className="space-y-4"> | ||
<h1 className="text-2xl font-semibold tracking-tight"> | ||
Suno AI Songs | ||
</h1> | ||
<p className="text-sm text-muted-foreground"></p> | ||
<Tab type="newest" /> | ||
</div> | ||
</div> | ||
|
||
<Playlist loading={loading} songs={songs || []} /> | ||
</div> | ||
); | ||
} |
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,66 @@ | ||
import Crumb from "../../_components/crumb"; | ||
import { Metadata } from "next"; | ||
import { Nav } from "@/types/nav"; | ||
import Playlist from "../../_components/playlist"; | ||
import Tab from "../../_components/tab"; | ||
import { getProviderLatestSongs } from "@/models/song"; | ||
import { getTranslations } from "next-intl/server"; | ||
|
||
export const maxDuration = 120; | ||
|
||
export async function generateMetadata({ | ||
params, | ||
}: { | ||
params: { locale: string }; | ||
}): Promise<Metadata> { | ||
const t = await getTranslations("metadata"); | ||
|
||
return { | ||
title: `Newest Udio AI Songs | ${t("newest_title")}`, | ||
description: `Newest Udio AI Songs | ${t("newest_description")}`, | ||
alternates: { | ||
canonical: `${process.env.NEXTAUTH_URL}/${ | ||
params.locale !== "en" ? params.locale + "/" : "" | ||
}newest/udio-ai-songs`, | ||
}, | ||
}; | ||
} | ||
|
||
export default async function ({}) { | ||
const t = await getTranslations("nav"); | ||
const songs = await getProviderLatestSongs("udio", 1, 50); | ||
const loading = false; | ||
|
||
const crumbNavs: Nav[] = [ | ||
{ | ||
title: t("home"), | ||
url: "/", | ||
}, | ||
{ | ||
title: t("newest"), | ||
url: "/newest", | ||
}, | ||
{ | ||
title: "Udio AI Songs", | ||
active: true, | ||
}, | ||
]; | ||
|
||
return ( | ||
<div> | ||
<Crumb navs={crumbNavs} /> | ||
|
||
<div className="flex items-center justify-between mb-4"> | ||
<div className="space-y-4"> | ||
<h1 className="text-2xl font-semibold tracking-tight"> | ||
Udio AI Songs | ||
</h1> | ||
<p className="text-sm text-muted-foreground"></p> | ||
<Tab type="newest" /> | ||
</div> | ||
</div> | ||
|
||
<Playlist loading={loading} songs={songs || []} /> | ||
</div> | ||
); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import Crumb from "../../_components/crumb"; | ||
import { Metadata } from "next"; | ||
import { Nav } from "@/types/nav"; | ||
import Playlist from "../../_components/playlist"; | ||
import Tab from "../../_components/tab"; | ||
import { getProviderRandomSongs } from "@/models/song"; | ||
import { getTranslations } from "next-intl/server"; | ||
|
||
export const maxDuration = 120; | ||
|
||
export async function generateMetadata({ | ||
params, | ||
}: { | ||
params: { locale: string }; | ||
}): Promise<Metadata> { | ||
const t = await getTranslations("metadata"); | ||
|
||
return { | ||
title: `Random Suno AI Songs | ${t("roaming_title")}`, | ||
description: `Random Suno AI Songs | ${t("roaming_description")}`, | ||
alternates: { | ||
canonical: `${process.env.NEXTAUTH_URL}/${ | ||
params.locale !== "en" ? params.locale + "/" : "" | ||
}roaming/suno-ai-songs`, | ||
}, | ||
}; | ||
} | ||
|
||
export default async function ({}) { | ||
const t = await getTranslations("nav"); | ||
const songs = await getProviderRandomSongs("suno", 1, 50); | ||
const loading = false; | ||
|
||
const crumbNavs: Nav[] = [ | ||
{ | ||
title: t("home"), | ||
url: "/", | ||
}, | ||
{ | ||
title: t("roaming"), | ||
url: "/roaming", | ||
}, | ||
{ | ||
title: "Suno AI Songs", | ||
active: true, | ||
}, | ||
]; | ||
|
||
return ( | ||
<div> | ||
<Crumb navs={crumbNavs} /> | ||
|
||
<div className="flex items-center justify-between mb-4"> | ||
<div className="space-y-4"> | ||
<h1 className="text-2xl font-semibold tracking-tight"> | ||
Suno AI Songs | ||
</h1> | ||
<p className="text-sm text-muted-foreground"></p> | ||
<Tab type="roaming" /> | ||
</div> | ||
</div> | ||
|
||
<Playlist loading={loading} songs={songs || []} /> | ||
</div> | ||
); | ||
} |
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,66 @@ | ||
import Crumb from "../../_components/crumb"; | ||
import { Metadata } from "next"; | ||
import { Nav } from "@/types/nav"; | ||
import Playlist from "../../_components/playlist"; | ||
import Tab from "../../_components/tab"; | ||
import { getProviderRandomSongs } from "@/models/song"; | ||
import { getTranslations } from "next-intl/server"; | ||
|
||
export const maxDuration = 120; | ||
|
||
export async function generateMetadata({ | ||
params, | ||
}: { | ||
params: { locale: string }; | ||
}): Promise<Metadata> { | ||
const t = await getTranslations("metadata"); | ||
|
||
return { | ||
title: `Random Udio AI Songs | ${t("roaming_title")}`, | ||
description: `Random Udio AI Songs | ${t("roaming_description")}`, | ||
alternates: { | ||
canonical: `${process.env.NEXTAUTH_URL}/${ | ||
params.locale !== "en" ? params.locale + "/" : "" | ||
}roaming/udio-ai-songs`, | ||
}, | ||
}; | ||
} | ||
|
||
export default async function ({}) { | ||
const t = await getTranslations("nav"); | ||
const songs = await getProviderRandomSongs("udio", 1, 50); | ||
const loading = false; | ||
|
||
const crumbNavs: Nav[] = [ | ||
{ | ||
title: t("home"), | ||
url: "/", | ||
}, | ||
{ | ||
title: t("roaming"), | ||
url: "/roaming", | ||
}, | ||
{ | ||
title: "Udio AI Songs", | ||
active: true, | ||
}, | ||
]; | ||
|
||
return ( | ||
<div> | ||
<Crumb navs={crumbNavs} /> | ||
|
||
<div className="flex items-center justify-between mb-4"> | ||
<div className="space-y-4"> | ||
<h1 className="text-2xl font-semibold tracking-tight"> | ||
Udio AI Songs | ||
</h1> | ||
<p className="text-sm text-muted-foreground"></p> | ||
<Tab type="roaming" /> | ||
</div> | ||
</div> | ||
|
||
<Playlist loading={loading} songs={songs || []} /> | ||
</div> | ||
); | ||
} |
Oops, something went wrong.