Skip to content

Commit

Permalink
Change /store* url to /marketplace*
Browse files Browse the repository at this point in the history
  • Loading branch information
kcze committed Dec 21, 2024
1 parent 10865cd commit 593ad02
Show file tree
Hide file tree
Showing 26 changed files with 41 additions and 41 deletions.
8 changes: 4 additions & 4 deletions autogpt_platform/frontend/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default async function RootLayout({
links={[
{
name: "Marketplace",
href: "/store",
href: "/marketplace",
},
{
name: "Library",
Expand All @@ -55,7 +55,7 @@ export default async function RootLayout({
{
icon: IconType.Edit,
text: "Edit profile",
href: "/store/profile",
href: "/marketplace/profile",
},
],
},
Expand All @@ -64,7 +64,7 @@ export default async function RootLayout({
{
icon: IconType.LayoutDashboard,
text: "Creator Dashboard",
href: "/store/dashboard",
href: "/marketplace/dashboard",
},
{
icon: IconType.UploadCloud,
Expand All @@ -77,7 +77,7 @@ export default async function RootLayout({
{
icon: IconType.Settings,
text: "Settings",
href: "/store/settings",
href: "/marketplace/settings",
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion autogpt_platform/frontend/src/app/login/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
},
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
],
},
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: "#" },
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: "#" },
]}
/>
Expand Down
2 changes: 1 addition & 1 deletion autogpt_platform/frontend/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
import { redirect } from "next/navigation";

export default function Page() {
redirect("/store");
redirect("/marketplace");
}
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" : ""}`}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
}
};

Expand Down
16 changes: 8 additions & 8 deletions autogpt_platform/frontend/src/components/agptui/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand All @@ -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" />
Expand All @@ -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" />
Expand All @@ -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" />
Expand All @@ -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" />
Expand All @@ -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" />
Expand All @@ -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" />
Expand All @@ -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" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)}`,
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)}`,
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export const PublishAgentPopout: React.FC<PublishAgentPopoutProps> = ({
onClose={handleClose}
onDone={handleClose}
onViewProgress={() => {
router.push("/store/dashboard");
router.push("/marketplace/dashboard");
handleClose();
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function NavBarButtons({ className }: { className?: string }) {
icon: <BsBoxes />,
},
{
href: "/store",
href: "/marketplace",
text: "Marketplace",
icon: <IconMarketplace />,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
}
Expand Down
8 changes: 4 additions & 4 deletions autogpt_platform/frontend/src/lib/supabase/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"];

Expand Down Expand Up @@ -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);
}

Expand Down
8 changes: 4 additions & 4 deletions autogpt_platform/frontend/src/tests/auth.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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();

Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion autogpt_platform/frontend/src/tests/profile.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ({
Expand Down

0 comments on commit 593ad02

Please sign in to comment.