-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTrustedBy.tsx
More file actions
73 lines (71 loc) · 3.62 KB
/
TrustedBy.tsx
File metadata and controls
73 lines (71 loc) · 3.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import { motion } from "framer-motion";
import NumberFlow from "@number-flow/react";
import { useState } from "react";
export const TrustedBy = () => {
const [odometerValue, setOdometerValue] = useState(0);
return (
<section className="py-12 sm:py-24 bg-bgDark1 w-full lg:mt-16 mb-8 lg:mb-16">
<motion.div
initial={{ opacity: 0 }}
whileInView={{ opacity: 1 }}
viewport={{ once: true }}
transition={{ duration: 0.5, delay: 0.2 }}
onViewportEnter={() => {
setTimeout(() => {
setOdometerValue(387);
}, 500);
}}
>
<div className="container px-4 mx-auto 2xl:w-[1200px] xl:w-[1100px] lg:w-[1000px] md:w-4/5">
<div className="flex lg:flex-row flex-col items-center -mx-4 justify-center lg:text-left text-center">
<div className="w-full lg:w-1/2 px-4 mb-12 lg:mb-0">
<div className="flex flex-col">
<h2 className="mb-2 text-4xl sm:text-5xl 2xl:text-6xl font-bold tracking-normal text-primaryText">
Trusted by
</h2>
<h2 className=" text-4xl sm:text-5xl 2xl:text-6xl font-bold tracking-normal text-secondaryColor">
servers
</h2>
</div>
</div>
<div className="w-2/3 sm:w-[620px] lg:w-1/2 mx-auto lg:mx-0 lg:pl-10">
<div className="flex flex-wrap -m-4">
<motion.div
initial={{ opacity: 0 }}
whileInView={{ opacity: 1 }}
viewport={{ once: true }}
transition={{ duration: 0.5, delay: 0.2 }}
className="items-center m-auto text-white text-7xl flex"
>
<NumberFlow
value={odometerValue}
spinTiming={{
duration: 2000,
easing: "cubic-bezier(0.785, 0.135, 0.15, 0.86)",
}}
/>
<p>+</p>
</motion.div>
</div>
</div>
</div>
<motion.div
initial={{ opacity: 0, y: 10 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.5, delay: 0.15 }}
>
<div className="flex flex-col gap-2 sm:flex-row mt-4">
<a
href="/stats"
className="w-64 sm:w-52 h-12 rounded-xl font-bold text-primaryText border border-solid flex justify-center items-center cursor-pointer bg-bgDark2 hover:bg-bgDark3 border-primaryColor transition"
aria-label="Join Support Server"
>
View more stats ➡️
</a>
</div>
</motion.div>
</div>
</motion.div>
</section>
);
};