Avatar

@shanberg

1 like2 public vals
Joined April 5, 2023
1
2
3
4
5
6
7
8
9
10
11
12
13
export function daysUntil(date) {
// console.log("run");
// console.log(date);
// return date;
console.log(date);
const now = new Date();
const targetDate = new Date(date);
// get the difference in milliseconds
const difference = targetDate - now;
// convert milliseconds to days
const days = Math.ceil(difference / (24 * 60 * 60 * 1000));
return days;
}
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
export const theme = {
semanticTokens: {
colors: {
"chakra-body-text": {
_light: "gray.800",
_dark: "whiteAlpha.900",
},
"chakra-body-bg": {
_light: "white",
_dark: "gray.800",
},
"chakra-border-color": {
_light: "gray.200",
_dark: "whiteAlpha.300",
},
"chakra-subtle-bg": {
_light: "gray.100",
_dark: "gray.700",
},
"chakra-placeholder-color": {
_light: "gray.500",
_dark: "whiteAlpha.400",
},
},
},
direction: "ltr",
breakpoints: {
base: "0em",
sm: "30em",
md: "48em",
lg: "62em",
xl: "80em",
"2xl": "96em",
},
zIndices: {
hide: -1,
auto: "auto",
base: 0,
docked: 10,
dropdown: 1000,
sticky: 1100,
banner: 1200,
overlay: 1300,
modal: 1400,
popover: 1500,
skipLink: 1600,
toast: 1700,
tooltip: 1800,
},
radii: {
none: "0",
sm: "0.125rem",
base: "0.25rem",
md: "0.375rem",
lg: "0.5rem",
xl: "0.75rem",
"2xl": "1rem",
"3xl": "1.5rem",
full: "9999px",
},
blur: {
none: 0,
sm: "4px",
base: "8px",
md: "12px",
lg: "16px",
xl: "24px",
"2xl": "40px",
"3xl": "64px",
},
colors: {
transparent: "transparent",
current: "currentColor",
black: "#000000",
white: "#FFFFFF",
whiteAlpha: {
"50": "rgba(255, 255, 255, 0.04)",
"100": "rgba(255, 255, 255, 0.06)",
"200": "rgba(255, 255, 255, 0.08)",
"300": "rgba(255, 255, 255, 0.16)",
"400": "rgba(255, 255, 255, 0.24)",
"500": "rgba(255, 255, 255, 0.36)",
"600": "rgba(255, 255, 255, 0.48)",
"700": "rgba(255, 255, 255, 0.64)",
"800": "rgba(255, 255, 255, 0.80)",
"900": "rgba(255, 255, 255, 0.92)",
},
blackAlpha: {
"50": "rgba(0, 0, 0, 0.04)",
"100": "rgba(0, 0, 0, 0.06)",
"200": "rgba(0, 0, 0, 0.08)",
"300": "rgba(0, 0, 0, 0.16)",
"400": "rgba(0, 0, 0, 0.24)",
"500": "rgba(0, 0, 0, 0.36)",
"600": "rgba(0, 0, 0, 0.48)",
"700": "rgba(0, 0, 0, 0.64)",
"800": "rgba(0, 0, 0, 0.80)",
"900": "rgba(0, 0, 0, 0.92)",
},
gray: {
Next