From 711eaac508dcfbff4a1132ea0f45467ea0b2e174 Mon Sep 17 00:00:00 2001 From: Martin Cech Date: Tue, 20 Jun 2023 19:50:09 -0700 Subject: [PATCH] remove custom prefix handling thanks @davelopez --- client/src/components/Page/PageIndexActions.test.ts | 6 +----- client/src/components/Page/PageIndexActions.vue | 8 +------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/client/src/components/Page/PageIndexActions.test.ts b/client/src/components/Page/PageIndexActions.test.ts index 161715b5e5e..97392166dac 100644 --- a/client/src/components/Page/PageIndexActions.test.ts +++ b/client/src/components/Page/PageIndexActions.test.ts @@ -13,11 +13,7 @@ describe("PageIndexActions.vue", () => { }; beforeEach(async () => { - const propsData = { - root: "/rootprefix/", - }; wrapper = shallowMount(PageIndexActions, { - propsData, mocks: { $router: mockRouter, }, @@ -29,7 +25,7 @@ describe("PageIndexActions.vue", () => { it("should create a page when create is clicked", async () => { await wrapper.find("#page-create").trigger("click"); expect(mockRouter.push).toHaveBeenCalledTimes(1); - expect(mockRouter.push).toHaveBeenCalledWith("/rootprefix/pages/create"); + expect(mockRouter.push).toHaveBeenCalledWith("/pages/create"); }); }); }); diff --git a/client/src/components/Page/PageIndexActions.vue b/client/src/components/Page/PageIndexActions.vue index 66db3dc09d3..8c658fe079e 100644 --- a/client/src/components/Page/PageIndexActions.vue +++ b/client/src/components/Page/PageIndexActions.vue @@ -9,14 +9,8 @@ import { library } from "@fortawesome/fontawesome-svg-core"; const router = useRouter(); library.add(faPlus); -interface PageIndexActionsProps { - root: string; -} - -const props = defineProps(); - function create() { - router.push(`${props.root}pages/create`); + router.push("/pages/create"); }