From c635e5b6bab0665039b1f70d7c923fe1925dc6f5 Mon Sep 17 00:00:00 2001 From: Kim Lan Phan Hoang Date: Wed, 6 Mar 2024 10:09:08 +0100 Subject: [PATCH] fix: revert previous published item layout (#1058) * fix: revert previous published item layout * refactor: fix publish button --- src/components/common/PublishButton.tsx | 9 ++++++++- src/components/main/MainMenu.tsx | 4 +++- src/langs/constants.ts | 1 + src/langs/en.json | 1 + src/langs/fr.json | 1 + 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/components/common/PublishButton.tsx b/src/components/common/PublishButton.tsx index 651eb6510..7e516c15e 100644 --- a/src/components/common/PublishButton.tsx +++ b/src/components/common/PublishButton.tsx @@ -31,7 +31,14 @@ const PublishButton = ({ itemId }: Props): JSX.Element => { to={buildItemPublishPath(itemId)} component={Link} > - + ); diff --git a/src/components/main/MainMenu.tsx b/src/components/main/MainMenu.tsx index 0542befd0..f9f22a841 100644 --- a/src/components/main/MainMenu.tsx +++ b/src/components/main/MainMenu.tsx @@ -120,12 +120,14 @@ const MainMenu = (): JSX.Element => { goTo(PUBLISHED_ITEMS_PATH)} selected={pathname === PUBLISHED_ITEMS_PATH} - text="Published items" + text={translateBuilder(BUILDER.NAVIGATION_PUBLISHED_ITEMS_TITLE)} icon={ } /> diff --git a/src/langs/constants.ts b/src/langs/constants.ts index c414fc1ef..be0bd37bc 100644 --- a/src/langs/constants.ts +++ b/src/langs/constants.ts @@ -263,6 +263,7 @@ export const BUILDER = { ITEM_SELECTION_NAVIGATION_PARENT: 'ITEM_SELECTION_NAVIGATION_PARENT', MY_ITEMS_TITLE: 'MY_ITEMS_TITLE', NAVIGATION_FAVORITE_ITEMS_TITLE: 'NAVIGATION_FAVORITE_ITEMS_TITLE', + NAVIGATION_PUBLISHED_ITEMS_TITLE: 'NAVIGATION_PUBLISHED_ITEMS_TITLE', NAVIGATION_MY_ITEMS_TITLE: 'NAVIGATION_MY_ITEMS_TITLE', NAVIGATION_SHARED_ITEMS_TITLE: 'NAVIGATION_SHARED_ITEMS_TITLE', NEW_ITEM_APP_TAB_TEXT: 'NEW_ITEM_APP_TAB_TEXT', diff --git a/src/langs/en.json b/src/langs/en.json index 360c0ed2e..6413feb4b 100644 --- a/src/langs/en.json +++ b/src/langs/en.json @@ -188,6 +188,7 @@ "MOVE_ITEM_MODAL_TITLE_other": "Where do you want to move {{name}} and {{count}} others?", "MY_ITEMS_TITLE": "My Graasp", "NAVIGATION_FAVORITE_ITEMS_TITLE": "Favorite Items", + "NAVIGATION_PUBLISHED_ITEMS_TITLE": "Published Items", "NAVIGATION_MY_ITEMS_TITLE": "My Graasp", "NAVIGATION_SHARED_ITEMS_TITLE": "Shared Items", "NEW_ITEM_APP_TAB_TEXT": "Application", diff --git a/src/langs/fr.json b/src/langs/fr.json index 336e9a3a7..0aecd4988 100644 --- a/src/langs/fr.json +++ b/src/langs/fr.json @@ -181,6 +181,7 @@ "MOVE_ITEM_MODAL_TITLE_other": "Où déplacer {{name}} et {{count}} autres éléments ?", "MY_ITEMS_TITLE": "Mon Graasp", "NAVIGATION_FAVORITE_ITEMS_TITLE": "Éléments Favoris", + "NAVIGATION_PUBLISHED_ITEMS_TITLE": "Éléments Publiés", "NAVIGATION_MY_ITEMS_TITLE": "Mon Graasp", "NAVIGATION_SHARED_ITEMS_TITLE": "Éléments Partagés", "NEW_ITEM_APP_TAB_TEXT": "Application",