From b1d74b60f156bf73cef251c03b26e7489ba6c8cb Mon Sep 17 00:00:00 2001 From: Ben Furber Date: Fri, 6 Dec 2024 10:44:58 +0000 Subject: [PATCH] feat: change how-to urls to library --- .../src/Integrations/firebase-discord.ts | 2 +- .../createModerationEmails.spec.ts | 8 +-- .../templates/how-to-approval.html | 2 +- .../templates/how-to-needs-improvements.html | 2 +- .../templates/how-to-rejected.html | 2 +- .../templates/how-to-submission.html | 2 +- .../UserStatistics/UserStatistics.test.tsx | 2 +- .../src/UserStatistics/UserStatistics.tsx | 2 +- .../cypress/src/integration/common.spec.ts | 18 +++---- .../src/integration/howto/discussions.spec.ts | 4 +- .../src/integration/howto/read.spec.ts | 19 ++++--- .../src/integration/howto/search.spec.ts | 2 +- .../cypress/src/integration/howto/seo.spec.ts | 2 +- .../src/integration/howto/write.spec.ts | 24 ++++----- .../src/integration/notifications.spec.ts | 22 ++++---- packages/cypress/src/utils/TestUtils.ts | 2 +- .../Howto/Content/Common/SubmitStatus.tsx | 2 +- .../Howto/Content/EditHowto/EditHowto.tsx | 2 +- .../HowtoDescription/HowtoDescription.tsx | 4 +- .../Howto/Content/HowtoList/HowToCard.tsx | 4 +- .../Howto/Content/HowtoList/HowtoList.tsx | 2 +- src/pages/PageList.tsx | 2 +- .../User/content/UserCreatedDocuments.tsx | 2 +- .../User/content/UserCreatedDocumentsItem.tsx | 2 +- src/pages/common/Breadcrumbs/Breadcrumbs.tsx | 4 +- src/routes/_.how-to.$slug._index.tsx | 50 +++---------------- src/routes/_.how-to.$slug.edit.tsx | 26 +++------- src/routes/_.how-to._index.tsx | 12 +++-- src/routes/_.how-to.create.tsx | 17 +++---- src/routes/_.how-to.tsx | 20 ++++---- src/routes/_.library.$slug._index.tsx | 50 +++++++++++++++++++ src/routes/_.library.$slug.edit.tsx | 26 ++++++++++ src/routes/_.library._index.tsx | 10 ++++ src/routes/_.library.create.tsx | 15 ++++++ src/routes/_.library.tsx | 16 ++++++ src/services/notificationsService.server.ts | 2 +- src/stores/Discussions/discussions.store.tsx | 2 +- src/stores/Howto/howto.store.tsx | 4 +- 38 files changed, 234 insertions(+), 155 deletions(-) create mode 100644 src/routes/_.library.$slug._index.tsx create mode 100644 src/routes/_.library.$slug.edit.tsx create mode 100644 src/routes/_.library._index.tsx create mode 100644 src/routes/_.library.create.tsx create mode 100644 src/routes/_.library.tsx diff --git a/functions/src/Integrations/firebase-discord.ts b/functions/src/Integrations/firebase-discord.ts index 47dacc83a6..1c3415a50b 100644 --- a/functions/src/Integrations/firebase-discord.ts +++ b/functions/src/Integrations/firebase-discord.ts @@ -6,7 +6,7 @@ import { IResearchDB, ResearchUpdateStatus } from 'oa-shared/models/research' import { CONFIG } from '../config/config' import type { AxiosError, AxiosResponse } from 'axios' -import type { IMapPin,IResearch } from 'oa-shared/models' +import type { IMapPin, IResearch } from 'oa-shared/models' const SITE_URL = CONFIG.deployment.site_url // e.g. https://dev.onearmy.world or https://community.preciousplastic.com diff --git a/functions/src/emailNotifications/createModerationEmails.spec.ts b/functions/src/emailNotifications/createModerationEmails.spec.ts index a73fb5fc4f..718d1ff9fb 100644 --- a/functions/src/emailNotifications/createModerationEmails.spec.ts +++ b/functions/src/emailNotifications/createModerationEmails.spec.ts @@ -94,7 +94,7 @@ describe('Create howto moderation emails', () => { expect(html).toContain('Mock Howto') // Check that the email contains the correct howto link expect(html).toContain( - 'https://community.preciousplastic.com/how-to/00_user_1_howto', + 'https://community.preciousplastic.com/library/00_user_1_howto', ) // Check that the email contains the correct PP signoff expect(html).toContain(PP_SIGNOFF) @@ -134,7 +134,7 @@ describe('Create howto moderation emails', () => { expect(html).toContain('Mock Howto') // Check that the email contains the correct howto link expect(html).toContain( - 'https://community.preciousplastic.com/how-to/00_user_1_howto', + 'https://community.preciousplastic.com/library/00_user_1_howto', ) // Check that the email contains the correct PP signoff expect(html).toContain(PP_SIGNOFF) @@ -180,7 +180,7 @@ describe('Create howto moderation emails', () => { ) // Check that the email contains the correct howto link expect(html).toContain( - 'https://community.preciousplastic.com/how-to/00_user_1_howto', + 'https://community.preciousplastic.com/library/00_user_1_howto', ) // Check that the email contains the correct PP signoff expect(html).toContain(PP_SIGNOFF) @@ -225,7 +225,7 @@ describe('Create howto moderation emails', () => { expect(html).toContain('Mock Howto') // Check that the email contains the correct howto link expect(html).toContain( - 'https://community.preciousplastic.com/how-to/00_user_1_howto', + 'https://community.preciousplastic.com/library/00_user_1_howto', ) // Check that the email contains the correct howto guidelines link expect(html).toContain( diff --git a/functions/src/emailNotifications/templates/how-to-approval.html b/functions/src/emailNotifications/templates/how-to-approval.html index 56946b7bec..a6cf2998ac 100644 --- a/functions/src/emailNotifications/templates/how-to-approval.html +++ b/functions/src/emailNotifications/templates/how-to-approval.html @@ -5,7 +5,7 @@

It is visible on the community platform - here. + here.

Users are now be able to comment and mark it as useful.

diff --git a/functions/src/emailNotifications/templates/how-to-needs-improvements.html b/functions/src/emailNotifications/templates/how-to-needs-improvements.html index 46962de753..3bce0c4022 100644 --- a/functions/src/emailNotifications/templates/how-to-needs-improvements.html +++ b/functions/src/emailNotifications/templates/how-to-needs-improvements.html @@ -3,7 +3,7 @@

Hey {{user.displayName}},

- Your project, {{howto.title}}, + Your project, {{howto.title}}, needs more work before we can publish it.

diff --git a/functions/src/emailNotifications/templates/how-to-rejected.html b/functions/src/emailNotifications/templates/how-to-rejected.html index 83a0424196..3e5caa46a9 100644 --- a/functions/src/emailNotifications/templates/how-to-rejected.html +++ b/functions/src/emailNotifications/templates/how-to-rejected.html @@ -4,7 +4,7 @@

Thank you for submitting your project, - {{howto.title}}. We + {{howto.title}}. We appreciate your contribution and the time and effort you put into creating it.

diff --git a/functions/src/emailNotifications/templates/how-to-submission.html b/functions/src/emailNotifications/templates/how-to-submission.html index 5757ecf0dd..d5996ffe9c 100644 --- a/functions/src/emailNotifications/templates/how-to-submission.html +++ b/functions/src/emailNotifications/templates/how-to-submission.html @@ -4,7 +4,7 @@

Huzzah! Your project - {{howto.title}} has been + {{howto.title}} has been submitted.

diff --git a/packages/components/src/UserStatistics/UserStatistics.test.tsx b/packages/components/src/UserStatistics/UserStatistics.test.tsx index 0eb3a85f3a..e9d9cd1c97 100644 --- a/packages/components/src/UserStatistics/UserStatistics.test.tsx +++ b/packages/components/src/UserStatistics/UserStatistics.test.tsx @@ -36,7 +36,7 @@ describe('UserStatistics', () => { ) const howtoLink = getByTestId('howto-link') - expect(howtoLink.getAttribute('href')).toBe('/how-to?q=Test User') + expect(howtoLink.getAttribute('href')).toBe('/library?q=Test User') }) it('renders research link when on research stats', () => { diff --git a/packages/components/src/UserStatistics/UserStatistics.tsx b/packages/components/src/UserStatistics/UserStatistics.tsx index 7ace91b93b..987784326c 100644 --- a/packages/components/src/UserStatistics/UserStatistics.tsx +++ b/packages/components/src/UserStatistics/UserStatistics.tsx @@ -83,7 +83,7 @@ export const UserStatistics = (props: UserStatisticsProps) => { {props.howtoCount > 0 && ( diff --git a/packages/cypress/src/integration/common.spec.ts b/packages/cypress/src/integration/common.spec.ts index 97d22c17b9..8e6e8a83ca 100644 --- a/packages/cypress/src/integration/common.spec.ts +++ b/packages/cypress/src/integration/common.spec.ts @@ -17,7 +17,7 @@ describe('[Common]', () => { }) it('[Page Navigation]', () => { - cy.visit('/how-to') + cy.visit('/library') cy.wait(2000) cy.step('Go to Academy page') @@ -25,10 +25,10 @@ describe('[Common]', () => { cy.wait(2000) cy.url().should('include', '/academy') - cy.get('[data-cy=page-link]').contains('How-to').click() cy.step('Go to library page') + cy.get('[data-cy=page-link]').contains('Library').click() cy.wait(2000) - cy.url().should('include', '/how-to') + cy.url().should('include', '/library') cy.step('Go to Map page') cy.get('[data-cy=page-link]').contains('Map').click() @@ -38,12 +38,12 @@ describe('[Common]', () => { describe('[User feeback button]', () => { it('[Desktop]', () => { - cy.visit('/how-to') + cy.visit('/library') cy.wait(2000) cy.get('[data-cy=feedback]').should('contain', 'Report a Problem') cy.get('[data-cy=feedback]') .should('have.attr', 'href') - .and('contain', '/how-to?sort=Newest') + .and('contain', '/library?sort=Newest') cy.visit('/map') cy.wait(2000) @@ -55,12 +55,12 @@ describe('[Common]', () => { it('[Mobile]', () => { cy.viewport('iphone-6') - cy.visit('/how-to') + cy.visit('/library') cy.wait(2000) cy.get('[data-cy=feedback]').should('contain', 'Problem?') cy.get('[data-cy=feedback]') .should('have.attr', 'href') - .and('contain', '/how-to?sort=Newest') + .and('contain', '/library?sort=Newest') cy.visit('/map') cy.wait(2000) @@ -73,7 +73,7 @@ describe('[Common]', () => { describe('[User Menu]', () => { it('[By Anonymous]', () => { cy.step('Login and Join buttons are available') - cy.visit('/how-to') + cy.visit('/library') cy.wait(2000) cy.get('[data-cy=login]').should('be.visible') cy.get('[data-cy=join]').should('be.visible') @@ -81,7 +81,7 @@ describe('[Common]', () => { }) it('[By Authenticated]', () => { - cy.visit('/how-to') + cy.visit('/library') cy.step('Login and Join buttons are unavailable to logged-in users') const user = generateNewUserDetails() diff --git a/packages/cypress/src/integration/howto/discussions.spec.ts b/packages/cypress/src/integration/howto/discussions.spec.ts index e819d287d5..345c5fd5de 100644 --- a/packages/cypress/src/integration/howto/discussions.spec.ts +++ b/packages/cypress/src/integration/howto/discussions.spec.ts @@ -17,7 +17,7 @@ const howtoDiscussion = Object.values(MOCK_DATA.discussions).find( describe('[Howto.Discussions]', () => { it('can open using deep links', () => { const firstComment = howtoDiscussion.comments[0] - cy.visit(`/how-to/${item.slug}#comment:${firstComment._id}`) + cy.visit(`/library/${item.slug}#comment:${firstComment._id}`) cy.wait(2000) cy.checkCommentItem(firstComment.text, 2) }) @@ -32,7 +32,7 @@ describe('[Howto.Discussions]', () => { const newReply = `Thanks Dave and Ben. What does everyone else think? - ${visitor.username}` const updatedNewReply = `Anyone else? All the best, ${visitor.username}` - const howtoPath = `/how-to/howto-for-discussion-${visitor.username}` + const howtoPath = `/library/howto-for-discussion-${visitor.username}` cy.step('Can add comment') cy.visit(howtoPath) diff --git a/packages/cypress/src/integration/howto/read.spec.ts b/packages/cypress/src/integration/howto/read.spec.ts index c54e5eb268..db95454156 100644 --- a/packages/cypress/src/integration/howto/read.spec.ts +++ b/packages/cypress/src/integration/howto/read.spec.ts @@ -12,7 +12,7 @@ describe('[Library]', () => { describe('[List projects]', () => { // const howtoSlug = 'make-glass-like-beams' - // const howtoUrl = `/how-to/${howtoSlug}` + // const howtoUrl = `/library/${howtoSlug}` // const coverFileRegex = /howto-beams-glass-0-3.jpg/ // it('[By Everyone]', () => { // cy.step('More projects button is hidden') @@ -44,12 +44,12 @@ describe('[Library]', () => { // }) }) - const specificHowtoUrl = '/how-to/make-an-interlocking-brick' describe('[Read a project]', () => { + const specificHowtoUrl = '/library/make-an-interlocking-brick' const coverFileRegex = /brick-12-1.jpg/ beforeEach(() => { - cy.visit('/how-to') + cy.visit('/library') }) describe('[By Everyone]', () => { @@ -58,7 +58,10 @@ describe('[Library]', () => { // Hack to avoid flaky test as the tags are not being loaded on time cy.queryDocuments('howtos', '_id', '==', howto._id) - cy.visit(specificHowtoUrl) + cy.step('Old url pattern redirects to the new location') + cy.visit('/how-to/make-an-interlocking-brick') + cy.url().should('include', specificHowtoUrl) + cy.step('Edit button is not available') cy.get('[data-cy=edit]').should('not.exist') @@ -94,7 +97,7 @@ describe('[Library]', () => { .first() .children() .should('have.attr', 'href') - .and('equal', `/how-to`) + .and('equal', `/library`) cy.get('[data-cy=breadcrumbsItem]') .eq(1) @@ -103,7 +106,7 @@ describe('[Library]', () => { .eq(1) .children() .should('have.attr', 'href') - .and('equal', `/how-to?category=${howto.category._id}`) + .and('equal', `/library?category=${howto.category._id}`) cy.get('[data-cy=breadcrumbsItem]').eq(2).should('contain', howto.title) @@ -214,7 +217,7 @@ describe('[Library]', () => { }) describe('[Read a soft-deleted How-to]', () => { - const deletedHowtoUrl = '/how-to/deleted-how-to' + const deletedHowtoUrl = '/library/deleted-how-to' beforeEach(() => { cy.visit(deletedHowtoUrl) }) @@ -256,8 +259,8 @@ describe('[Library]', () => { }) }) - const howToNotFoundUrl = `/how-to/this-how-to-does-not-exist` describe('[Fail to find a project]', () => { + const howToNotFoundUrl = `/library/this-project-does-not-exist` it('[Redirects to search]', () => { cy.visit(howToNotFoundUrl) diff --git a/packages/cypress/src/integration/howto/search.spec.ts b/packages/cypress/src/integration/howto/search.spec.ts index 7a9e7fed0d..c819fca573 100644 --- a/packages/cypress/src/integration/howto/search.spec.ts +++ b/packages/cypress/src/integration/howto/search.spec.ts @@ -1,6 +1,6 @@ // describe('[Library]', () => { // beforeEach(() => { -// cy.visit('/how-to') +// cy.visit('/library') // }) // describe('[By Everyone]', () => { diff --git a/packages/cypress/src/integration/howto/seo.spec.ts b/packages/cypress/src/integration/howto/seo.spec.ts index 14e12d9136..36d248a9ca 100644 --- a/packages/cypress/src/integration/howto/seo.spec.ts +++ b/packages/cypress/src/integration/howto/seo.spec.ts @@ -8,7 +8,7 @@ describe('[Library]', () => { const pageTitle = `${title} - Library - Precious Plastic` it('[Populates title and description tags]', () => { - cy.visit(`/how-to/${slug}`) + cy.visit(`/library/${slug}`) // General cy.title().should('eq', pageTitle) cy.get('meta[name="description"]').should( diff --git a/packages/cypress/src/integration/howto/write.spec.ts b/packages/cypress/src/integration/howto/write.spec.ts index cb36a0ef08..bb9b0969d4 100644 --- a/packages/cypress/src/integration/howto/write.spec.ts +++ b/packages/cypress/src/integration/howto/write.spec.ts @@ -10,7 +10,7 @@ import { generateNewUserDetails } from '../../utils/TestUtils' describe('[Library]', () => { beforeEach(() => { - cy.visit('/how-to') + cy.visit('/library') }) type Category = 'brainstorm' | 'exhibition' | 'product' type Duration = '<1 week' | '1-2 weeks' | '3-4 weeks' @@ -188,10 +188,10 @@ describe('[Library]', () => { cy.signUpNewUser(creator) cy.get('[data-cy=loader]').should('not.exist') cy.get('[data-cy="MemberBadge-member"]').should('be.visible') - cy.visit('/how-to') + cy.visit('/library') - cy.get('a[href="/how-to/create"]').should('be.visible') cy.step('Access the create project page') + cy.get('a[href="/library/create"]').should('be.visible') cy.get('[data-cy=create]').click() cy.contains('Create a Project').should('be.visible') @@ -224,7 +224,7 @@ describe('[Library]', () => { cy.step('A basic draft was created') cy.fillIntroTitle(`qwerty ${randomId}`) cy.get('[data-cy=draft]').click() - const firstSlug = `/how-to/qwerty-${randomId}` + const firstSlug = `/library/qwerty-${randomId}` cy.get('[data-cy=view-howto]:enabled', { timeout: 20000 }) .click() .url() @@ -295,7 +295,7 @@ describe('[Library]', () => { cy.get('[data-cy=view-howto]:enabled', { timeout: 20000 }) .click() .url() - .should('include', `/how-to/${slug}`) + .should('include', `/library/${slug}`) cy.step('Howto was created correctly') cy.get('[data-cy=file-download-counter]') @@ -323,26 +323,26 @@ describe('[Library]', () => { }) it('[By Anonymous]', () => { - cy.step('Ask users to login before creating an how-to') - cy.visit('/how-to/create') + cy.step('Ask users to login before creating a project') + cy.visit('/library/create') cy.get('div').contains('Please login to access this page') }) it('[Warning on leaving page]', () => { cy.login(creator.email, creator.password) cy.get('[data-cy=loader]').should('not.exist') - cy.get('a[href="/how-to/create"]').should('be.visible') cy.step('Access the create project') + cy.get('a[href="/library/create"]').should('be.visible') cy.get('[data-cy=create]').click() cy.fillIntroTitle(expected.title) - cy.get('[data-cy=page-link][href*="/how-to"]').click() + cy.get('[data-cy=page-link][href*="/library"]').click() cy.get('[data-cy="Confirm.modal: Cancel"]').click() - cy.url().should('match', /\/how-to\/create$/) + cy.url().should('match', /\/library\/create$/) cy.step('Clear title input') cy.get('[data-cy=intro-title]').clear().blur({ force: true }) - cy.get('[data-cy=page-link][href*="/how-to"]').click() - cy.url().should('match', /\/how-to?/) + cy.get('[data-cy=page-link][href*="/library"]').click() + cy.url().should('match', /\/library?/) }) }) }) diff --git a/packages/cypress/src/integration/notifications.spec.ts b/packages/cypress/src/integration/notifications.spec.ts index 1d80c1d9df..e1203e3080 100644 --- a/packages/cypress/src/integration/notifications.spec.ts +++ b/packages/cypress/src/integration/notifications.spec.ts @@ -10,9 +10,9 @@ const DB_WAIT_TIME = 5000 describe('[Notifications]', () => { // Can't test like this now because we are now using the same users collection for all tests. // it('[are not generated when the howTo author is triggering notification]', () => { - // cy.visit('how-to') + // cy.visit('library') // cy.login('event_reader@test.com', 'test1234') - // cy.visit('/how-to/testing-testing') + // cy.visit('/library/testing-testing') // cy.wait(2000) // cy.get('[data-cy="vote-useful"]').contains('useful').click() // cy.step('Verify the notification has not been added') @@ -28,8 +28,8 @@ describe('[Notifications]', () => { const visitor = generateNewUserDetails() cy.signUpNewUser(visitor) - cy.visit('how-to') - cy.visit('/how-to/testing-testing') + cy.visit('library') + cy.visit('/library/testing-testing') cy.wait(DB_WAIT_TIME) cy.get('[data-cy="vote-useful"]').contains('useful').click() cy.wait(DB_WAIT_TIME) @@ -46,7 +46,7 @@ describe('[Notifications]', () => { triggeredBy.userId === visitor.username && type === 'howto_useful', ) expect(notification['type']).to.equal('howto_useful') - expect(notification['relevantUrl']).to.equal('/how-to/testing-testing') + expect(notification['relevantUrl']).to.equal('/library/testing-testing') expect(notification['read']).to.equal(false) expect(notification['triggeredBy']['displayName']).to.equal( visitor.username, @@ -85,9 +85,9 @@ describe('[Notifications]', () => { }) it('[appear in notifications modal]', () => { - cy.visit('how-to') + cy.visit('library') cy.login('event_reader@test.com', 'test1234') - cy.visit('/how-to/testing-testing') + cy.visit('/library/testing-testing') cy.get( '[data-cy="notifications-desktop"] [data-cy="toggle-notifications-modal"]', ).click() @@ -95,9 +95,9 @@ describe('[Notifications]', () => { }) it('[notifications modal is closed when clicking on the notifications icon for the second time or clicking on the header]', () => { - cy.visit('how-to') + cy.visit('library') cy.login('event_reader@test.com', 'test1234') - cy.visit('/how-to/testing-testing') + cy.visit('/library/testing-testing') cy.get( '[data-cy="notifications-desktop"] [data-cy="toggle-notifications-modal"]', ).click() @@ -117,9 +117,9 @@ describe('[Notifications]', () => { // Commented as it is working, but very flaky // it('[are marked read when clicking on clear button]', () => { - // cy.visit('how-to') + // cy.visit('library') // cy.login('event_reader@test.com', 'test1234') - // cy.visit('/how-to/testing-testing') + // cy.visit('/library/testing-testing') // cy.get( // '[data-cy="notifications-desktop"] [data-cy="toggle-notifications-modal"]', // ).click() diff --git a/packages/cypress/src/utils/TestUtils.ts b/packages/cypress/src/utils/TestUtils.ts index c293e15312..6e15cb56bb 100644 --- a/packages/cypress/src/utils/TestUtils.ts +++ b/packages/cypress/src/utils/TestUtils.ts @@ -5,7 +5,7 @@ export interface IUserSignUpDetails { } export enum Page { - HOWTO = '/how-to', + HOWTO = '/library', ACADEMY = '/academy', SETTINGS = '/settings', } diff --git a/src/pages/Howto/Content/Common/SubmitStatus.tsx b/src/pages/Howto/Content/Common/SubmitStatus.tsx index 35d6558f91..dc044b6806 100644 --- a/src/pages/Howto/Content/Common/SubmitStatus.tsx +++ b/src/pages/Howto/Content/Common/SubmitStatus.tsx @@ -46,7 +46,7 @@ const HowToSubmitStatus = observer((props: IProps) => { variant={!uploadStatus.Complete ? 'disabled' : 'outline'} icon="arrow-forward" onClick={() => { - navigate('/how-to/' + props.slug) + navigate('/library/' + props.slug) props.onClose() }} > diff --git a/src/pages/Howto/Content/EditHowto/EditHowto.tsx b/src/pages/Howto/Content/EditHowto/EditHowto.tsx index 70e43bd41a..459668b6c1 100644 --- a/src/pages/Howto/Content/EditHowto/EditHowto.tsx +++ b/src/pages/Howto/Content/EditHowto/EditHowto.tsx @@ -35,7 +35,7 @@ const EditHowto = ({ howto }: EditHowtoProps) => { if (loggedInUser && isAllowedToEditContent(formValues, loggedInUser)) { return } else { - return + return } } diff --git a/src/pages/Howto/Content/Howto/HowtoDescription/HowtoDescription.tsx b/src/pages/Howto/Content/Howto/HowtoDescription/HowtoDescription.tsx index d3b7b09801..42e709d4e7 100644 --- a/src/pages/Howto/Content/Howto/HowtoDescription/HowtoDescription.tsx +++ b/src/pages/Howto/Content/Howto/HowtoDescription/HowtoDescription.tsx @@ -67,7 +67,7 @@ const HowtoDescription = ({ howto, loggedInUser, ...props }: IProps) => { DELETION_LABEL, ) - navigate('/how-to') + navigate('/library') } catch (err) { logger.error(err) // at least log the error @@ -115,7 +115,7 @@ const HowtoDescription = ({ howto, loggedInUser, ...props }: IProps) => { {/* Check if logged in user is the creator of the project OR a super-admin */} {loggedInUser && isAllowedToEditContent(howto, loggedInUser) && ( - + diff --git a/src/pages/Howto/Content/HowtoList/HowToCard.tsx b/src/pages/Howto/Content/HowtoList/HowToCard.tsx index f326e25329..c559f3bd37 100644 --- a/src/pages/Howto/Content/HowtoList/HowToCard.tsx +++ b/src/pages/Howto/Content/HowtoList/HowToCard.tsx @@ -30,7 +30,7 @@ export const HowToCard = ({ howto }: IProps) => { > { {capitalizeFirstLetter(howto.title || '')} diff --git a/src/pages/Howto/Content/HowtoList/HowtoList.tsx b/src/pages/Howto/Content/HowtoList/HowtoList.tsx index 767e5fd3fe..189490b154 100644 --- a/src/pages/Howto/Content/HowtoList/HowtoList.tsx +++ b/src/pages/Howto/Content/HowtoList/HowtoList.tsx @@ -129,7 +129,7 @@ export const HowtoList = observer(() => { handleShowDrafts={handleShowDrafts} /> )} - +