Skip to content

Commit

Permalink
ui fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DonKoko committed Dec 10, 2024
1 parent 4ab2a77 commit 2049e6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/components/layout/sidebar/app-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ export default function AppSidebar(props: AppSidebarProps) {

<SidebarContent>
<SidebarNav items={topMenuItems} />
<SidebarNoticeCard />
</SidebarContent>

<SidebarFooter>
<SidebarNoticeCard />
<SidebarNav className="p-0" items={bottomMenuItems} />
<SidebarUserMenu />
</SidebarFooter>
Expand Down
5 changes: 3 additions & 2 deletions app/components/layout/sidebar/notice-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ import type { loader } from "~/routes/_layout+/_layout";
export const SidebarNoticeCard = () => {
const { hideNoticeCard } = useLoaderData<typeof loader>();
const fetcher = useFetcher();
console.log("hideNoticeCard", hideNoticeCard);

let optimisticHideNoticeCard = hideNoticeCard;
if (fetcher.formData) {
optimisticHideNoticeCard =
fetcher.formData.get("noticeCardVisibility") === "hidden";
}

return !optimisticHideNoticeCard ? null : (
<div className="support-banner mx-2 mb-6 hidden rounded bg-gray-50 px-4 py-5 md:block">
return optimisticHideNoticeCard ? null : (
<div className="support-banner mb-6 hidden rounded border bg-gray-50 px-2 py-3 md:block">
<div className="flex justify-between align-middle">
<h5 className="mb-1 font-semibold text-gray-900">
Install Shelf for Mobile
Expand Down

0 comments on commit 2049e6a

Please sign in to comment.