Skip to content

Commit

Permalink
Merge branch 'preview'
Browse files Browse the repository at this point in the history
  • Loading branch information
pdelfan committed Oct 31, 2024
2 parents f5ecf8d + 7f8c07b commit 96e3c1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
11 changes: 1 addition & 10 deletions src/components/navigational/appBar/AppBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import { usePathname } from "next/navigation";
import NavItem from "../navbar/NavItem";
import { useScrollContext } from "@/app/providers/scroll";
import useAgent from "@/lib/hooks/bsky/useAgent";
import { getUnreadNotificationsCount } from "@/lib/api/bsky/notification";
import { useQuery } from "@tanstack/react-query";
Expand All @@ -14,8 +13,6 @@ import { HiClipboardList, HiOutlineClipboardList } from "react-icons/hi";

export default function AppBar() {
const pathname = usePathname();
const val = useScrollContext();
const canUpdate = typeof window !== "undefined";
const agent = useAgent();
const {
data: notificationsCount,
Expand All @@ -28,13 +25,7 @@ export default function AppBar() {
});

return (
<nav
className="bg-skin-base border-skin-base fixed bottom-0 z-40 flex w-full justify-between gap-6 overflow-auto border-t px-6 pb-8 pt-1 transition-all ease-linear md:hidden"
style={{
opacity: canUpdate ? `${100 - (val ?? 0)}%` : "100%",
transform: canUpdate ? `translateY(${val ?? 0}%)` : "translateY(0%)",
}}
>
<nav className="bg-skin-base border-skin-base fixed bottom-0 z-40 flex w-full justify-between gap-6 overflow-auto border-t px-6 pb-8 pt-1 transition-all ease-linear md:hidden">
<NavItem
href="/dashboard/home"
icon={<BiHome className="text-2xl md:text-3xl" />}
Expand Down
11 changes: 1 addition & 10 deletions src/components/navigational/topBar/TopBar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"use client";

import { useScrollContext } from "@/app/providers/scroll";
import Button from "@/components/actions/button/Button";
import Avatar from "@/components/dataDisplay/avatar/Avatar";
import { ProfileViewDetailed } from "@atproto/api/dist/client/types/app/bsky/actor/defs";
Expand All @@ -14,17 +13,9 @@ interface Props {

export default function TopBar(props: Props) {
const { profile } = props;
const val = useScrollContext();
const canUpdate = typeof window !== "undefined" && window.innerWidth < 768;

return (
<div
className="bg-skin-base border-skin-base sticky top-0 z-50 flex items-center justify-between border-b px-3 py-2.5 transition-all ease-linear md:hidden"
style={{
opacity: canUpdate ? `${100 - (val ?? 0)}%` : "100%",
transform: canUpdate ? `translateY(-${val ?? 0}%)` : "translateY(-0%)",
}}
>
<div className="bg-skin-base border-skin-base sticky top-0 z-[60] flex items-center justify-between border-b px-3 py-2.5 transition-all ease-linear md:hidden">
<Link
href={`/dashboard/user/${profile?.handle}`}
className="hover:brightness-90"
Expand Down

0 comments on commit 96e3c1d

Please sign in to comment.