From 8e76cce9548778baddfd7b0aedc3e4fb2b0ed2de Mon Sep 17 00:00:00 2001 From: John Paul Larkin <107807466+John-Paul-Larkin@users.noreply.github.com> Date: Thu, 24 Oct 2024 12:24:42 +0100 Subject: [PATCH] apply focusable HOC --- .../create/[[...paramsArr]]/navigation.tsx | 23 ++++---- components/ArticleMenu/ArticleMenu.tsx | 44 +++++++------- components/ArticlePreview/ArticlePreview.tsx | 47 ++++++++------- components/Focusable/Focusable.tsx | 6 +- components/Nav/Nav.tsx | 57 +++++++++++-------- components/Theme/ThemeToggle/ThemeToggle.tsx | 25 ++++---- components/ui/Search.tsx | 19 ++++--- styles/globals.css | 4 -- 8 files changed, 122 insertions(+), 103 deletions(-) diff --git a/app/(editor)/create/[[...paramsArr]]/navigation.tsx b/app/(editor)/create/[[...paramsArr]]/navigation.tsx index d1b5397d..1af81912 100644 --- a/app/(editor)/create/[[...paramsArr]]/navigation.tsx +++ b/app/(editor)/create/[[...paramsArr]]/navigation.tsx @@ -9,6 +9,7 @@ import { Fragment } from "react"; import { type Session } from "next-auth"; import Logo from "@/icons/logo.svg"; import { type PostStatus, status } from "@/utils/post"; +import Focusable from "@/components/Focusable/Focusable"; type EditorNavProps = { session: Session | null; @@ -83,16 +84,18 @@ const EditorNav = ({ {session && ( <> - - View notifications - {hasNotifications && ( -
- )} -