-
-
Notifications
You must be signed in to change notification settings - Fork 171
Expand file tree
/
Copy pathhomepage-users.tsx
More file actions
128 lines (119 loc) · 4.1 KB
/
homepage-users.tsx
File metadata and controls
128 lines (119 loc) · 4.1 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
import clsx from 'clsx';
import React, { useEffect, useState } from 'react';
import { Carousel } from 'react-responsive-carousel';
import styles from './homepage-users.module.scss';
import 'react-responsive-carousel/lib/styles/carousel.min.css';
type User = {
image: string,
name: string,
testimonial: string,
style?: any,
author?: string,
};
const users: User[] = [
{
name: 'uphold',
image: '/img/uphold-logo.svg',
testimonial:
'Uphold is proud to be using Sequelize for 7+ years. It has served us well and has allowed us to grow to 12 million users (and counting). We will continue to invest and contribute in the platform.',
},
{
image: '/img/bitovi-logo.png',
style: { maxHeight: 50 },
name: 'Bitovi',
testimonial:
'We have used Sequelize in enterprise projects for some of our Fortune 100 and Fortune 500 clients. It is used in deployments that are depended on by hundreds of millions of devices every year.',
},
{
image: '/img/ermeshotels-logo.png',
name: 'Ermes Hotels',
testimonial:
'Using Sequelize in production for two different apps with 30k+ daily users by 2 years. I doubt there is something better at this moment in terms of productivity and features.',
},
{
image: '/img/secure-coders.png',
name: 'Secure Coders',
testimonial:
'Sequelize provides a reliable and convenient ORM for any SQL dialect which greatly simplifies working with both simple and complex data models. The data migration features are just icing on the cake.',
author: 'Charley Wooley',
},
{
image: '/img/logo-snaplytics-green.png',
name: 'Snaplytics',
testimonial:
'We\'ve been using sequelize since we started in the beginning of 2015. We use it for our graphql servers (in connection with graphql-sequelize), and for all our background workers.',
style: { paddingTop: '10px' },
},
// {
// image: "/img/shutterstock.png",
// name: "Shutterstock",
// style: { paddingTop: "10px" },
// },
{
image: '/img/walmart-labs-logo.png',
name: 'Walmart Labs',
testimonial:
'... we are avid users of sequelize and have been for the past 18 months. (Feb 2017)',
style: { paddingTop: '15px' },
},
];
export default function HomepageUsers(): JSX.Element {
const [activeUser, setActiveUser] = useState<User>(users[0]);
const [width, setWidth] = useState<number>(window.innerWidth);
function handleWindowSizeChange() {
setWidth(window.innerWidth);
}
const onChange = (index: number) => {
setActiveUser(users[index]);
};
useEffect(() => {
window.addEventListener('resize', handleWindowSizeChange);
return () => {
window.removeEventListener('resize', handleWindowSizeChange);
};
}, []);
const isMobile = width <= 768;
return (
<section className={styles.users}>
<div className="container">
<h2>Trusted and used by</h2>
<div className={clsx(styles.userRow)}>
<Carousel
showArrows={false}
showStatus={false}
showIndicators={false}
infiniteLoop
showThumbs={false}
useKeyboardArrows={false}
autoPlay
stopOnHover={false}
swipeable={false}
emulateTouch
centerSlidePercentage={isMobile ? 75 : 25}
centerMode
onChange={onChange}
transitionTime={1000}
>
{users.map(user => (
<div key={user.name} className={styles.slide}>
<img src={user.image} style={user.style} alt={user.name} />
</div>
))}
</Carousel>
<div className={styles.testimonialWrapper}>
<div className={styles.testimonial}>
<span className={styles.testimonialText}>
{activeUser.testimonial}
</span>
<span className={styles.userName}>
{activeUser.author
? `${activeUser.author} (${activeUser.name})`
: activeUser.name}
</span>
</div>
</div>
</div>
</div>
</section>
);
}