Skip to content

Commit

Permalink
Fix deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
dv297 committed Oct 19, 2022
1 parent 6c48aef commit a481c64
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions src/pages/blog/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ReactNode } from 'react';
import { motion } from 'framer-motion';
import Link from 'next/link';
import { useRouter } from 'next/router';
import { groq } from 'next-sanity';
Expand Down Expand Up @@ -38,7 +39,13 @@ const Posts = (props: any) => {

return (
<div className="px-8">
<div className="mt-8">
<motion.div
className="mt-8"
style={{ x: -10 }}
initial={{ opacity: 0.1 }}
animate={{ opacity: 1, x: 0 }}
transition={{ duration: 1 }}
>
<h1 className="mb-4 text-4xl md:text-6xl text-center font-bold font-heading font-heading tracking-px-n leading-tight">
The Latest from{' '}
<span className="text-primary block text-5xl md:text-7xl">
Expand All @@ -54,7 +61,7 @@ const Posts = (props: any) => {
</span>
</Link>
</p>
</div>
</motion.div>
<div className="relative mx-auto max-w-7xl">
<div className="mx-auto mt-12 grid max-w-lg gap-5 lg:max-w-none lg:grid-cols-3">
{posts.map((post: any) => {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ReactNode } from 'react';
import { motion, useTransform, useViewportScroll } from 'framer-motion';
import { motion, useScroll, useTransform } from 'framer-motion';
import Image from 'next/image';
import { useRouter } from 'next/router';
import { getSession, signIn } from 'next-auth/react';
Expand Down Expand Up @@ -30,7 +30,7 @@ const ActionItemButton = (props: { title: string }) => {
};

const useScrollAnimation = (yCoordinates: [number, number]) => {
const { scrollY } = useViewportScroll();
const { scrollY } = useScroll();

const leftXDisplacement = useTransform(scrollY, yCoordinates, [
'-5px',
Expand Down

1 comment on commit a481c64

@vercel
Copy link

@vercel vercel bot commented on a481c64 Oct 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

planner – ./

planner-dv297.vercel.app
planner-git-main-dv297.vercel.app
planner-nine.vercel.app

Please sign in to comment.