Skip to content

Commit

Permalink
Fixed type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanpoland committed Jan 6, 2025
1 parent 7e44ff6 commit 0ce5192
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
11 changes: 10 additions & 1 deletion components/blocks/features.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,16 @@ const features = [
}
];

const FeatureCard = ({ feature }) => {
interface Feature {
icon: React.ReactNode;
title: string;
description: string;
detail: string;
area: string;
className: string;
}

const FeatureCard = ({ feature }: { feature: Feature }) => {
return (
<div
className={`group relative p-6 bg-black border border-zinc-800
Expand Down
4 changes: 2 additions & 2 deletions components/blocks/ghstats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ const fetchGitHubStats = async () => {
};
};

const fetchContributors = async (url) => {
const fetchContributors = async (url: string | URL | Request) => {
const response = await fetch(url);
const data = await response.json();
return data.length;
};

const MetricCard = ({ icon: Icon, label, value, detail }) => (
const MetricCard = ({ icon: Icon, label, value, detail }: { icon: React.ElementType, label: string, value: number | string, detail: string }) => (
<div className="relative group">
{/* Card content */}
<div className="p-6 bg-zinc-900/50 border border-zinc-800 rounded-sm
Expand Down
6 changes: 2 additions & 4 deletions components/blocks/hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import React, { useState, useEffect } from 'react';
import { Zap, Server, Lock } from 'lucide-react';

const generateRacks = (count) => {
const generateRacks = (count: number) => {
return Array.from({ length: count }, (_, index) => {
const xStep = 6;
const yStep = 3.6;
Expand Down Expand Up @@ -104,9 +104,7 @@ const Hero = () => {
alt={`Server Rack ${index + 1}`}
className="h-96"
style={{
'--tw-translate-x': `${transform.x}rem`,
'--tw-translate-y': `${transform.y}rem`,
transform: 'translate(var(--tw-translate-x), var(--tw-translate-y))',
transform: `translate(${transform.x}rem, ${transform.y}rem)`,
zIndex: transform.z
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion components/blocks/workflow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const Workflow = () => {
}, []);

useEffect(() => {
let interval;
let interval: string | number | NodeJS.Timeout | undefined;
if (isVisible) {
interval = setInterval(() => {
setActivePhase((prev) => (prev + 1) % phases.length);
Expand Down
2 changes: 1 addition & 1 deletion components/layout/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const ForgeLogoSVG = () => (
</svg>
);

const NavLink = ({ href, children }) => (
const NavLink: React.FC<{ href: string; children: React.ReactNode }> = ({ href, children }) => (
<Link
href={href}
className="text-sm text-zinc-400 hover:text-white transition-colors duration-200"
Expand Down

0 comments on commit 0ce5192

Please sign in to comment.