Skip to content

Commit ee65cc3

Browse files
committed
fix: resolve typescript errors
1 parent 3a52cea commit ee65cc3

File tree

5 files changed

+53
-70
lines changed

5 files changed

+53
-70
lines changed

components/atoms/button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type Props = {
1212
white?: boolean;
1313
};
1414

15-
const Button = ({ className, href, children, onClick, px = "px-7", white = false }: Props) => {
15+
const Button = ({ className, href = "", children, onClick, px = "px-7", white = false }: Props) => {
1616
const buttonClasses = cn(
1717
`button relative inline-flex items-center justify-center h-11`,
1818
`transition-colors hover:text-color-1`,
@@ -37,7 +37,7 @@ const Button = ({ className, href, children, onClick, px = "px-7", white = false
3737
</Link>
3838
);
3939

40-
return href ? renderLink() : renderButton();
40+
return href !== "" ? renderLink() : renderButton();
4141
};
4242

4343
export default Button;

components/design/hero.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client";
22

3-
import { useEffect, useState } from "react";
3+
import React, { useEffect, useState } from "react";
44
import { MouseParallax } from "react-just-parallax";
55

66
import PlusSvg from "@/components/svg/plus-svg";
@@ -37,7 +37,11 @@ const Rings = () => {
3737
);
3838
};
3939

40-
export const BackgroundCircles = ({ parallaxRef }) => {
40+
export const BackgroundCircles = ({
41+
parallaxRef,
42+
}: {
43+
parallaxRef: React.MutableRefObject<HTMLDivElement | null>;
44+
}) => {
4145
const [mounted, setMounted] = useState(false);
4246

4347
useEffect(() => {

components/design/roadmap.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { gradient } from "@/public/assets/index";
1+
import { images } from "@/constants";
22

33
export const Gradient = () => {
44
return (
55
<div className="pointer-events-none absolute -left-[30.375rem] top-[18.25rem] w-[56.625rem] opacity-60 mix-blend-color-dodge">
66
<div className="absolute left-1/2 top-1/2 size-[58.85rem] -translate-x-3/4 -translate-y-1/2">
7-
<img className="w-full" src={gradient} width={942} height={942} alt="Gradient" />
7+
<img className="w-full" src={images.gradient} width={942} height={942} alt="Gradient" />
88
</div>
99
</div>
1010
);

components/svg/brackets.tsx

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
const brackets = (position) =>
1+
const brackets = (position: "left" | "right") =>
22
position === "left" ? (
3-
<svg
4-
width="5"
5-
height="14"
6-
viewBox="0 0 5 14"
7-
fill="none"
8-
xmlns="http://www.w3.org/2000/svg"
9-
>
3+
<svg width="5" height="14" viewBox="0 0 5 14" fill="none" xmlns="http://www.w3.org/2000/svg">
104
<path d="M5 0.822266H1V12.8223H5" stroke="url(#brackets-left)" />
115
<defs>
126
<linearGradient id="brackets-left" x1="50%" x2="50%" y1="0%" y2="100%">
@@ -16,25 +10,10 @@ const brackets = (position) =>
1610
</defs>
1711
</svg>
1812
) : (
19-
<svg
20-
width="5"
21-
height="14"
22-
viewBox="0 0 5 14"
23-
fill="none"
24-
xmlns="http://www.w3.org/2000/svg"
25-
>
26-
<path
27-
d="M-2.98023e-08 0.822266H4V12.8223H-2.98023e-08"
28-
stroke="url(#brackets-right)"
29-
/>
13+
<svg width="5" height="14" viewBox="0 0 5 14" fill="none" xmlns="http://www.w3.org/2000/svg">
14+
<path d="M-2.98023e-08 0.822266H4V12.8223H-2.98023e-08" stroke="url(#brackets-right)" />
3015
<defs>
31-
<linearGradient
32-
id="brackets-right"
33-
x1="14.635%"
34-
x2="14.635%"
35-
y1="0%"
36-
y2="100%"
37-
>
16+
<linearGradient id="brackets-right" x1="14.635%" x2="14.635%" y1="0%" y2="100%">
3817
<stop offset="0%" stopColor="#9099FC" />
3918
<stop offset="100%" stopColor="#D87CEE" />
4019
</linearGradient>

constants/index.ts

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,3 @@
1-
import {
2-
homeSmile,
3-
file02,
4-
searchMd,
5-
plusSquare,
6-
notification4,
7-
notification3,
8-
notification2,
9-
yourlogo,
10-
recording03,
11-
recording01,
12-
disc02,
13-
chromecast,
14-
sliders04,
15-
roadmap1,
16-
roadmap2,
17-
roadmap3,
18-
roadmap4,
19-
figma,
20-
notion,
21-
discord,
22-
slack,
23-
photoshop,
24-
protopie,
25-
framer,
26-
raindrop,
27-
benefitIcon1,
28-
benefitImage2,
29-
benefitIcon2,
30-
benefitIcon3,
31-
benefitIcon4,
32-
discordBlack,
33-
twitter,
34-
instagram,
35-
telegram,
36-
facebook,
37-
} from "@/public/assets";
38-
391
export const images = {
402
yourlogo: "/assets/yourlogo.svg",
413
brainwave: "/assets/brainwave.svg",
@@ -107,6 +69,44 @@ export const images = {
10769
twitter: "/assets/socials/twitter.svg",
10870
};
10971

72+
const {
73+
yourlogo,
74+
homeSmile,
75+
file02,
76+
searchMd,
77+
plusSquare,
78+
recording03,
79+
recording01,
80+
disc02,
81+
chromecast,
82+
sliders04,
83+
discord,
84+
figma,
85+
framer,
86+
notion,
87+
photoshop,
88+
protopie,
89+
raindrop,
90+
slack,
91+
roadmap1,
92+
roadmap2,
93+
roadmap3,
94+
roadmap4,
95+
notification2,
96+
notification3,
97+
notification4,
98+
benefitIcon1,
99+
benefitIcon2,
100+
benefitIcon3,
101+
benefitIcon4,
102+
benefitImage2,
103+
discordBlack,
104+
facebook,
105+
instagram,
106+
telegram,
107+
twitter,
108+
} = images;
109+
110110
export const navigation = [
111111
{
112112
id: "0",

0 commit comments

Comments
 (0)