Skip to content

Instantly share code, notes, and snippets.

View ljaxferrand's full-sized avatar

LJ ljaxferrand

  • Vancouver, BC
View GitHub Profile
@ljaxferrand
ljaxferrand / _app.js
Created July 19, 2022 19:43
Framer Motion: Respect user motion prefs
import { motion, AnimatePresence } from "framer-motion";
import { fadeDown } from "../utils/animations";
import { MotionConfig } from "framer-motion";
import Layout from "../components/Layout";
import "../styles/globals.css";
function MyApp({ Component, pageProps, router }) {
return (
<MotionConfig reducedMotion="user">
@ljaxferrand
ljaxferrand / MovieCard.js
Last active November 13, 2021 21:17
Fresh Movie?
<span className="rating">
{movieObj.vote_average > 5 ? (
<img className="thumbs" src={thumbsUp} alt="Thumbs up for this movie."/>
) : (
<img className="thumbs" src={thumbsDown} alt="Thumbs down for this movie"/>
)}
{movieObj.vote_average * 10 + "%"}
</span>