-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathRiveo.tsx
58 lines (54 loc) · 1.26 KB
/
Riveo.tsx
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
/* eslint-disable @typescript-eslint/no-var-requires */
import { useFont } from "@shopify/react-native-skia";
import React from "react";
import { Background } from "./Background";
import { Project } from "./Project";
const boldTf = require("./assets/Roboto-Bold.ttf");
const regularTf = require("./assets/Roboto-Regular.ttf");
const projects: Project[] = [
{
id: "zurich",
title: "Zürich",
size: "45MB",
duration: "1:06m",
picture: require("./assets/zurich2.jpg"),
color: "#BDA098",
},
{
id: "oslo",
title: "Oslo",
size: "1GB",
duration: "5:02m",
picture: require("./assets/oslo2.jpg"),
color: "#59659a",
},
{
id: "krakow",
title: "Kraków",
size: "500MB",
duration: "11:04m",
picture: require("./assets/krakow.jpg"),
color: "#BAB9B0",
},
];
export const Riveo = () => {
const titleFont = useFont(boldTf, 36);
const normalFont = useFont(regularTf, 18);
if (!titleFont || !normalFont) {
return null;
}
return (
<Background>
{projects.map((project, index) => {
return (
<Project
key={index}
font={titleFont}
smallFont={normalFont}
project={project}
/>
);
})}
</Background>
);
};