Change `/store*` url to `/marketplace*`
This commit is contained in:
parent
10865cd736
commit
593ad0222e
|
@ -38,7 +38,7 @@ export default async function RootLayout({
|
|||
links={[
|
||||
{
|
||||
name: "Marketplace",
|
||||
href: "/store",
|
||||
href: "/marketplace",
|
||||
},
|
||||
{
|
||||
name: "Library",
|
||||
|
@ -55,7 +55,7 @@ export default async function RootLayout({
|
|||
{
|
||||
icon: IconType.Edit,
|
||||
text: "Edit profile",
|
||||
href: "/store/profile",
|
||||
href: "/marketplace/profile",
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -64,7 +64,7 @@ export default async function RootLayout({
|
|||
{
|
||||
icon: IconType.LayoutDashboard,
|
||||
text: "Creator Dashboard",
|
||||
href: "/store/dashboard",
|
||||
href: "/marketplace/dashboard",
|
||||
},
|
||||
{
|
||||
icon: IconType.UploadCloud,
|
||||
|
@ -77,7 +77,7 @@ export default async function RootLayout({
|
|||
{
|
||||
icon: IconType.Settings,
|
||||
text: "Settings",
|
||||
href: "/store/settings",
|
||||
href: "/marketplace/settings",
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
@ -99,7 +99,7 @@ export async function signup(values: z.infer<typeof loginFormSchema>) {
|
|||
}
|
||||
console.log("Signed up");
|
||||
revalidatePath("/", "layout");
|
||||
redirect("/store/profile");
|
||||
redirect("/marketplace/profile");
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
@ -5,11 +5,11 @@ export default function Layout({ children }: { children: React.ReactNode }) {
|
|||
const sidebarLinkGroups = [
|
||||
{
|
||||
links: [
|
||||
{ text: "Creator Dashboard", href: "/store/dashboard" },
|
||||
{ text: "Agent dashboard", href: "/store/agent-dashboard" },
|
||||
{ text: "Integrations", href: "/store/integrations" },
|
||||
{ text: "Profile", href: "/store/profile" },
|
||||
{ text: "Settings", href: "/store/settings" },
|
||||
{ text: "Creator Dashboard", href: "/marketplace/dashboard" },
|
||||
{ text: "Agent dashboard", href: "/marketplace/agent-dashboard" },
|
||||
{ text: "Integrations", href: "/marketplace/integrations" },
|
||||
{ text: "Profile", href: "/marketplace/profile" },
|
||||
{ text: "Settings", href: "/marketplace/settings" },
|
||||
],
|
||||
},
|
||||
];
|
|
@ -44,10 +44,10 @@ export default async function Page({
|
|||
});
|
||||
|
||||
const breadcrumbs = [
|
||||
{ name: "Store", link: "/store" },
|
||||
{ name: "Store", link: "/marketplace" },
|
||||
{
|
||||
name: agent.creator,
|
||||
link: `/store/creator/${encodeURIComponent(agent.creator)}`,
|
||||
link: `/marketplace/creator/${encodeURIComponent(agent.creator)}`,
|
||||
},
|
||||
{ name: agent.agent_name, link: "#" },
|
||||
];
|
|
@ -47,7 +47,7 @@ export default async function Page({
|
|||
<main className="mt-5 px-4">
|
||||
<BreadCrumbs
|
||||
items={[
|
||||
{ name: "Store", link: "/store" },
|
||||
{ name: "Store", link: "/marketplace" },
|
||||
{ name: creator.name, link: "#" },
|
||||
]}
|
||||
/>
|
|
@ -3,5 +3,5 @@
|
|||
import { redirect } from "next/navigation";
|
||||
|
||||
export default function Page() {
|
||||
redirect("/store");
|
||||
redirect("/marketplace");
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ export const AgentInfo: React.FC<AgentInfoProps> = ({
|
|||
by
|
||||
</div>
|
||||
<Link
|
||||
href={`/store/creator/${encodeURIComponent(creator)}`}
|
||||
href={`/marketplace/creator/${encodeURIComponent(creator)}`}
|
||||
className="font-geist text-base font-medium text-neutral-800 hover:underline dark:text-neutral-200 sm:text-lg lg:text-xl"
|
||||
>
|
||||
{creator}
|
||||
|
|
|
@ -28,7 +28,7 @@ export const NavbarLink = ({ name, href }: NavbarLinkProps) => {
|
|||
: ""
|
||||
} flex items-center justify-start gap-3`}
|
||||
>
|
||||
{href === "/store" && (
|
||||
{href === "/marketplace" && (
|
||||
<IconShoppingCart
|
||||
className={`h-6 w-6 ${activeLink === href ? "text-white dark:text-black" : ""}`}
|
||||
/>
|
||||
|
|
|
@ -36,7 +36,7 @@ export const SearchBar: React.FC<SearchBarProps> = ({
|
|||
if (searchQuery.trim()) {
|
||||
// Encode the search term and navigate to the desired path
|
||||
const encodedTerm = encodeURIComponent(searchQuery);
|
||||
router.push(`/store/search?searchTerm=${encodedTerm}`);
|
||||
router.push(`/marketplace/search?searchTerm=${encodedTerm}`);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ export const Sidebar: React.FC<SidebarProps> = ({ linkGroups }) => {
|
|||
<div className="h-full w-full rounded-2xl bg-zinc-200 dark:bg-zinc-800">
|
||||
<div className="inline-flex h-[264px] flex-col items-start justify-start gap-6 p-3">
|
||||
<Link
|
||||
href="/store/dashboard"
|
||||
href="/marketplace/dashboard"
|
||||
className="inline-flex w-full items-center gap-2.5 rounded-xl px-3 py-3 text-neutral-800 hover:bg-neutral-800 hover:text-white dark:text-neutral-200 dark:hover:bg-neutral-700 dark:hover:text-white"
|
||||
>
|
||||
<IconDashboardLayout className="h-6 w-6" />
|
||||
|
@ -50,7 +50,7 @@ export const Sidebar: React.FC<SidebarProps> = ({ linkGroups }) => {
|
|||
</div>
|
||||
</Link>
|
||||
<Link
|
||||
href="/store/integrations"
|
||||
href="/marketplace/integrations"
|
||||
className="inline-flex w-full items-center gap-2.5 rounded-xl px-3 py-3 text-neutral-800 hover:bg-neutral-800 hover:text-white dark:text-neutral-200 dark:hover:bg-neutral-700 dark:hover:text-white"
|
||||
>
|
||||
<IconIntegrations className="h-6 w-6" />
|
||||
|
@ -59,7 +59,7 @@ export const Sidebar: React.FC<SidebarProps> = ({ linkGroups }) => {
|
|||
</div>
|
||||
</Link>
|
||||
<Link
|
||||
href="/store/profile"
|
||||
href="/marketplace/profile"
|
||||
className="inline-flex w-full items-center gap-2.5 rounded-xl px-3 py-3 text-neutral-800 hover:bg-neutral-800 hover:text-white dark:text-neutral-200 dark:hover:bg-neutral-700 dark:hover:text-white"
|
||||
>
|
||||
<IconProfile className="h-6 w-6" />
|
||||
|
@ -68,7 +68,7 @@ export const Sidebar: React.FC<SidebarProps> = ({ linkGroups }) => {
|
|||
</div>
|
||||
</Link>
|
||||
<Link
|
||||
href="/store/settings"
|
||||
href="/marketplace/settings"
|
||||
className="inline-flex w-full items-center gap-2.5 rounded-xl px-3 py-3 text-neutral-800 hover:bg-neutral-800 hover:text-white dark:text-neutral-200 dark:hover:bg-neutral-700 dark:hover:text-white"
|
||||
>
|
||||
<IconSliders className="h-6 w-6" />
|
||||
|
@ -85,7 +85,7 @@ export const Sidebar: React.FC<SidebarProps> = ({ linkGroups }) => {
|
|||
<div className="h-full w-full rounded-2xl bg-zinc-200 dark:bg-zinc-800">
|
||||
<div className="inline-flex h-[264px] flex-col items-start justify-start gap-6 p-3">
|
||||
<Link
|
||||
href="/store/dashboard"
|
||||
href="/marketplace/dashboard"
|
||||
className="inline-flex w-full items-center gap-2.5 rounded-xl px-3 py-3 text-neutral-800 hover:bg-neutral-800 hover:text-white dark:text-neutral-200 dark:hover:bg-neutral-700 dark:hover:text-white"
|
||||
>
|
||||
<IconDashboardLayout className="h-6 w-6" />
|
||||
|
@ -94,7 +94,7 @@ export const Sidebar: React.FC<SidebarProps> = ({ linkGroups }) => {
|
|||
</div>
|
||||
</Link>
|
||||
<Link
|
||||
href="/store/integrations"
|
||||
href="/marketplace/integrations"
|
||||
className="inline-flex w-full items-center gap-2.5 rounded-xl px-3 py-3 text-neutral-800 hover:bg-neutral-800 hover:text-white dark:text-neutral-200 dark:hover:bg-neutral-700 dark:hover:text-white"
|
||||
>
|
||||
<IconIntegrations className="h-6 w-6" />
|
||||
|
@ -103,7 +103,7 @@ export const Sidebar: React.FC<SidebarProps> = ({ linkGroups }) => {
|
|||
</div>
|
||||
</Link>
|
||||
<Link
|
||||
href="/store/profile"
|
||||
href="/marketplace/profile"
|
||||
className="inline-flex w-full items-center gap-2.5 rounded-xl px-3 py-3 text-neutral-800 hover:bg-neutral-800 hover:text-white dark:text-neutral-200 dark:hover:bg-neutral-700 dark:hover:text-white"
|
||||
>
|
||||
<IconProfile className="h-6 w-6" />
|
||||
|
@ -112,7 +112,7 @@ export const Sidebar: React.FC<SidebarProps> = ({ linkGroups }) => {
|
|||
</div>
|
||||
</Link>
|
||||
<Link
|
||||
href="/store/settings"
|
||||
href="/marketplace/settings"
|
||||
className="inline-flex w-full items-center gap-2.5 rounded-xl px-3 py-3 text-neutral-800 hover:bg-neutral-800 hover:text-white dark:text-neutral-200 dark:hover:bg-neutral-700 dark:hover:text-white"
|
||||
>
|
||||
<IconSliders className="h-6 w-6" />
|
||||
|
|
|
@ -39,7 +39,7 @@ export const AgentsSection: React.FC<AgentsSectionProps> = ({
|
|||
|
||||
const handleCardClick = (creator: string, slug: string) => {
|
||||
router.push(
|
||||
`/store/agent/${encodeURIComponent(creator)}/${encodeURIComponent(slug)}`,
|
||||
`/marketplace/agent/${encodeURIComponent(creator)}/${encodeURIComponent(slug)}`,
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ export const FeaturedCreators: React.FC<FeaturedCreatorsProps> = ({
|
|||
const router = useRouter();
|
||||
|
||||
const handleCardClick = (creator: string) => {
|
||||
router.push(`/store/creator/${encodeURIComponent(creator)}`);
|
||||
router.push(`/marketplace/creator/${encodeURIComponent(creator)}`);
|
||||
};
|
||||
|
||||
// Only show first 4 creators
|
||||
|
|
|
@ -41,7 +41,7 @@ export const FeaturedSection: React.FC<FeaturedSectionProps> = ({
|
|||
|
||||
const handleCardClick = (creator: string, slug: string) => {
|
||||
router.push(
|
||||
`/store/agent/${encodeURIComponent(creator)}/${encodeURIComponent(slug)}`,
|
||||
`/marketplace/agent/${encodeURIComponent(creator)}/${encodeURIComponent(slug)}`,
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ export const HeroSection: React.FC = () => {
|
|||
|
||||
function onFilterChange(selectedFilters: string[]) {
|
||||
const encodedTerm = encodeURIComponent(selectedFilters.join(", "));
|
||||
router.push(`/store/search?searchTerm=${encodedTerm}`);
|
||||
router.push(`/marketplace/search?searchTerm=${encodedTerm}`);
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
@ -260,7 +260,7 @@ export const PublishAgentPopout: React.FC<PublishAgentPopoutProps> = ({
|
|||
onClose={handleClose}
|
||||
onDone={handleClose}
|
||||
onViewProgress={() => {
|
||||
router.push("/store/dashboard");
|
||||
router.push("/marketplace/dashboard");
|
||||
handleClose();
|
||||
}}
|
||||
/>
|
||||
|
|
|
@ -24,7 +24,7 @@ export function NavBarButtons({ className }: { className?: string }) {
|
|||
icon: <BsBoxes />,
|
||||
},
|
||||
{
|
||||
href: "/store",
|
||||
href: "/marketplace",
|
||||
text: "Marketplace",
|
||||
icon: <IconMarketplace />,
|
||||
},
|
||||
|
|
|
@ -311,7 +311,7 @@ export default class BackendAPI {
|
|||
"/store/submissions/generate_image?agent_id=" + agent_id,
|
||||
);
|
||||
}
|
||||
c;
|
||||
|
||||
deleteStoreSubmission(submission_id: string): Promise<boolean> {
|
||||
return this._request("DELETE", `/store/submissions/${submission_id}`);
|
||||
}
|
||||
|
|
|
@ -5,9 +5,9 @@ import { NextResponse, type NextRequest } from "next/server";
|
|||
const PROTECTED_PAGES = [
|
||||
"/monitor",
|
||||
"/build",
|
||||
"/store/profile",
|
||||
"/store/settings",
|
||||
"/store/dashboard",
|
||||
"/marketplace/profile",
|
||||
"/marketplace/settings",
|
||||
"/marketplace/dashboard",
|
||||
];
|
||||
const ADMIN_PAGES = ["/admin"];
|
||||
|
||||
|
@ -87,7 +87,7 @@ export async function updateSession(request: NextRequest) {
|
|||
ADMIN_PAGES.some((page) => request.nextUrl.pathname.startsWith(`${page}`))
|
||||
) {
|
||||
// no user, potentially respond by redirecting the user to the login page
|
||||
url.pathname = `/store`;
|
||||
url.pathname = `/marketplace`;
|
||||
return NextResponse.redirect(url);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ test.describe("Authentication", () => {
|
|||
test("user can login successfully", async ({ page, loginPage, testUser }) => {
|
||||
await page.goto("/login");
|
||||
await loginPage.login(testUser.email, testUser.password);
|
||||
await test.expect(page).toHaveURL("/store");
|
||||
await test.expect(page).toHaveURL("/marketplace");
|
||||
await test
|
||||
.expect(page.getByTestId("profile-popout-menu-trigger"))
|
||||
.toBeVisible();
|
||||
|
@ -19,7 +19,7 @@ test.describe("Authentication", () => {
|
|||
await page.goto("/login");
|
||||
await loginPage.login(testUser.email, testUser.password);
|
||||
|
||||
await test.expect(page).toHaveURL("/store");
|
||||
await test.expect(page).toHaveURL("/marketplace");
|
||||
|
||||
// Click on the profile menu trigger to open popout
|
||||
await page.getByTestId("profile-popout-menu-trigger").click();
|
||||
|
@ -43,7 +43,7 @@ test.describe("Authentication", () => {
|
|||
}) => {
|
||||
await page.goto("/login");
|
||||
await loginPage.login(testUser.email, testUser.password);
|
||||
await test.expect(page).toHaveURL("/store");
|
||||
await test.expect(page).toHaveURL("/marketplace");
|
||||
// Click on the profile menu trigger to open popout
|
||||
await page.getByTestId("profile-popout-menu-trigger").click();
|
||||
|
||||
|
@ -52,7 +52,7 @@ test.describe("Authentication", () => {
|
|||
|
||||
await test.expect(page).toHaveURL("/login");
|
||||
await loginPage.login(testUser.email, testUser.password);
|
||||
await test.expect(page).toHaveURL("/store");
|
||||
await test.expect(page).toHaveURL("/marketplace");
|
||||
await test
|
||||
.expect(page.getByTestId("profile-popout-menu-trigger"))
|
||||
.toBeVisible();
|
||||
|
|
|
@ -10,7 +10,7 @@ test.describe("Profile", () => {
|
|||
// Start each test with login using worker auth
|
||||
await page.goto("/login");
|
||||
await loginPage.login(testUser.email, testUser.password);
|
||||
await test.expect(page).toHaveURL("/store");
|
||||
await test.expect(page).toHaveURL("/marketplace");
|
||||
});
|
||||
|
||||
test("user can view their profile information", async ({
|
||||
|
|
Loading…
Reference in New Issue