From 45abfb3fa783e5000288063125d4d806fcd285a6 Mon Sep 17 00:00:00 2001 From: Cintia Sanchez Garcia Date: Tue, 28 May 2024 10:44:03 +0200 Subject: [PATCH] Improve embed demo Signed-off-by: Cintia Sanchez Garcia --- .gitignore | 1 + web/src/context/AppContextProvider.tsx | 4 ++-- web/src/layout/navigation/Navbar.module.css | 4 ++++ web/src/layout/navigation/Navbar.tsx | 4 +++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index dc2e1ee..7b28bef 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ Chart.lock chart/charts web/build web/src/media +web/src/demo-embed npm-debug.log* yarn-debug.log* yarn-error.log* diff --git a/web/src/context/AppContextProvider.tsx b/web/src/context/AppContextProvider.tsx index 46510d2..ce16cfa 100644 --- a/web/src/context/AppContextProvider.tsx +++ b/web/src/context/AppContextProvider.tsx @@ -102,12 +102,12 @@ export function appReducer(state: AppState, action: Action) { theme: { ...action.theme }, search: { limit: EMBED_SEARCH_LIMIT, - sortBy: DEFAULT_SORT_BY, + sort: { by: DEFAULT_SORT_BY }, }, }; return { - ...state, + prefs: prefs, isEmbed: action.isEmbed, }; diff --git a/web/src/layout/navigation/Navbar.module.css b/web/src/layout/navigation/Navbar.module.css index e5c2e79..05fa36b 100644 --- a/web/src/layout/navigation/Navbar.module.css +++ b/web/src/layout/navigation/Navbar.module.css @@ -24,6 +24,10 @@ background-color: var(--color-black-25); } +.externalLink { + cursor: pointer; +} + @media (hover: hover) { .link:hover::before { content: ''; diff --git a/web/src/layout/navigation/Navbar.tsx b/web/src/layout/navigation/Navbar.tsx index 39faf1c..b02c921 100644 --- a/web/src/layout/navigation/Navbar.tsx +++ b/web/src/layout/navigation/Navbar.tsx @@ -24,7 +24,9 @@ const Navbar = () => {
{isEmbed ? ( - CLOTributor logo + + CLOTributor logo + ) : ( scrollToTop()} className="cursorPointer"> CLOTributor logo