Working state: Serbian at root (/), English at /en, proper i18n structure
This commit is contained in:
35
src/components/home/TickerBar.tsx
Normal file
35
src/components/home/TickerBar.tsx
Normal file
@@ -0,0 +1,35 @@
|
||||
"use client";
|
||||
|
||||
import { motion } from "framer-motion";
|
||||
|
||||
export default function TickerBar() {
|
||||
const items = [
|
||||
"Free shipping on orders over 3000 RSD",
|
||||
"Natural ingredients",
|
||||
"Cruelty-free",
|
||||
"Handmade with love",
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="bg-foreground text-white py-3 overflow-hidden">
|
||||
<motion.div
|
||||
className="flex whitespace-nowrap"
|
||||
animate={{ x: ["0%", "-50%"] }}
|
||||
transition={{
|
||||
x: {
|
||||
repeat: Infinity,
|
||||
repeatType: "loop",
|
||||
duration: 20,
|
||||
ease: "linear",
|
||||
},
|
||||
}}
|
||||
>
|
||||
{[...items, ...items, ...items, ...items].map((item, index) => (
|
||||
<span key={index} className="mx-8 text-sm tracking-wide">
|
||||
{item}
|
||||
</span>
|
||||
))}
|
||||
</motion.div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user