diff --git a/src/components/Group/GroupSection.vue b/src/components/Group/GroupSection.vue index 038409c04..c5db0c99f 100644 --- a/src/components/Group/GroupSection.vue +++ b/src/components/Group/GroupSection.vue @@ -1,11 +1,5 @@ <template> - <section - class="flex flex-col mb-3 border-2" - :class="{ - 'border-mbz-purple': privateSection, - 'border-yellow-1': !privateSection, - }" - > + <section class="flex flex-col mb-3 border-2 border-yellow-1"> <div class="flex items-stretch py-3 px-1 bg-yellow-1 text-violet-title"> <div class="flex flex-1 gap-1"> <o-icon :icon="icon" custom-size="36" /> @@ -31,10 +25,9 @@ withDefaults( defineProps<{ title: string; icon: string; - privateSection?: boolean; route: { name: string; params: { preferredUsername: string } }; }>(), - { privateSection: true } + {} ); const { t } = useI18n({ useScope: "global" }); </script> diff --git a/src/components/Group/Sections/EventsSection.vue b/src/components/Group/Sections/EventsSection.vue index 3aa84cf07..4f65f8af5 100644 --- a/src/components/Group/Sections/EventsSection.vue +++ b/src/components/Group/Sections/EventsSection.vue @@ -2,7 +2,6 @@ <group-section :title="t('Events')" icon="calendar" - :privateSection="false" :route="{ name: RouteName.GROUP_EVENTS, params: { preferredUsername: usernameWithDomain(group) }, diff --git a/src/components/Group/Sections/PostsSection.vue b/src/components/Group/Sections/PostsSection.vue index 3ee6812f8..12f5c9631 100644 --- a/src/components/Group/Sections/PostsSection.vue +++ b/src/components/Group/Sections/PostsSection.vue @@ -2,7 +2,6 @@ <group-section :title="t('Announcements')" icon="bullhorn" - :privateSection="false" :route="{ name: RouteName.POSTS, params: { preferredUsername: usernameWithDomain(group) }, diff --git a/tests/unit/specs/components/Group/GroupSection.spec.ts b/tests/unit/specs/components/Group/GroupSection.spec.ts index 73b1a06bd..06d47ca6d 100644 --- a/tests/unit/specs/components/Group/GroupSection.spec.ts +++ b/tests/unit/specs/components/Group/GroupSection.spec.ts @@ -29,7 +29,6 @@ const createSlotButtonText = "+ Create a post"; type Props = { title?: string; icon?: string; - privateSection?: boolean; route?: { name: string; params: { preferredUsername: string } }; }; @@ -73,10 +72,6 @@ describe("GroupSection", () => { expect(wrapper.find("a").attributes("href")).toBe(`/@${groupUsername}/p`); - // expect(wrapper.find(".group-section-title").classes("privateSection")).toBe( - // true - // ); - expect(wrapper.find("section > div.flex-1").text()).toBe(defaultSlotText); expect(wrapper.find(".flex.justify-end.p-2 a").text()).toBe( createSlotButtonText @@ -88,11 +83,8 @@ describe("GroupSection", () => { }); it("renders public group section", () => { - const wrapper = generateWrapper({ privateSection: false }); + const wrapper = generateWrapper(); - // expect(wrapper.find(".group-section-title").classes("privateSection")).toBe( - // false - // ); expect(wrapper.html()).toMatchSnapshot(); }); });