Skip to content

Commit

Permalink
fix: hide prev button (#1473)
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity authored Sep 12, 2024
1 parent 876df1d commit 672dab2
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions packages/ui/app/src/components/BottomNavigationNeighbors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,18 @@ export const BottomNavigationNeighbors: FC<BottomNavigationNeighborsProps> = (pr
const neighborsFromAtom = useAtomValue(NEIGHBORS_ATOM);
const neighbors = props.neighbors ?? neighborsFromAtom;

const prev = useMemo(() => {
if (neighbors.prev == null) {
return undefined;
}
return {
title: neighbors.prev.title,
excerpt: neighbors.prev.excerpt,
href: toHref(neighbors.prev.slug),
};
}, [neighbors.prev, toHref]);
// TODO: Uncomment this when we improve the UI for the previous button

// const prev = useMemo(() => {
// if (neighbors.prev == null) {
// return undefined;
// }
// return {
// title: neighbors.prev.title,
// excerpt: neighbors.prev.excerpt,
// href: toHref(neighbors.prev.slug),
// };
// }, [neighbors.prev, toHref]);

const next = useMemo(() => {
if (neighbors.next == null) {
Expand All @@ -36,5 +38,5 @@ export const BottomNavigationNeighbors: FC<BottomNavigationNeighborsProps> = (pr
};
}, [neighbors.next, toHref]);

return <BottomNavigationButtons prev={prev} next={next} />;
return <BottomNavigationButtons next={next} />;
};

0 comments on commit 672dab2

Please sign in to comment.