Skip to content

Instantly share code, notes, and snippets.

View Eronred's full-sized avatar
🔮
Building

Erencan Arica Eronred

🔮
Building
View GitHub Profile
"use client";
import { motion } from "framer-motion";
import React, { useState, useEffect } from "react";
const CounterTime: React.FC = () => {
const [time, setTime] = useState<number>(0);
useEffect(() => {
const interval = setInterval(() => {
setTime((prevTime) => (prevTime < 12 ? prevTime + 1 : 0));
@Eronred
Eronred / AirbnbImageAnimation
Created June 5, 2024 13:33
Airbnb animated images
import { motion } from 'framer-motion'
import React from 'react'
const images = [
{
src: 'https://a0.muscache.com/im/pictures/miso/Hosting-2810308/original/a653d85a-1a97-45d7-a213-78ef2286122a.jpeg?im_w=720',
alt: 'Tree'
},
{
src: 'https://a0.muscache.com/im/pictures/2cc58022-2004-4034-a281-22fb622e7461.jpg?im_w=720',