Skip to content

Commit

Permalink
I have truly suffered for this feature.
Browse files Browse the repository at this point in the history
  • Loading branch information
LutherTS committed Sep 11, 2024
1 parent dbf613b commit fc1f154
Show file tree
Hide file tree
Showing 5 changed files with 208 additions and 180 deletions.
3 changes: 3 additions & 0 deletions app/(pages)/calendar/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { useState } from "react";
// @ts-ignore
import useKeypress from "react-use-keypress";
import useMeasure from "react-use-measure";
// import { useMeasure } from "@uidotdev/usehooks"; // pretty much works all the same

let daysLabels = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];

Expand All @@ -39,6 +40,7 @@ export default function Page() {
let [direction, setDirection] = useState<number>();
let [isAnimating, setIsAnimating] = useState(false);
let [ref, bounds] = useMeasure();
// let [ref, { height }] = useMeasure();

let month = parse(monthString, "yyyy-MM", new Date());

Expand Down Expand Up @@ -83,6 +85,7 @@ export default function Page() {
<div className="flex flex-col justify-center rounded text-center">
<motion.div
animate={{ height: bounds.height > 0 ? bounds.height : null }}
// animate={{ height: height > 0 ? height : null }}
transition={{
type: "spring",
bounce: 0.2,
Expand Down
Loading

0 comments on commit fc1f154

Please sign in to comment.