Skip to content

Commit

Permalink
fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
thajj committed Sep 20, 2024
1 parent 01059ca commit 694d296
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 58 deletions.
2 changes: 1 addition & 1 deletion src/components/FancyCursor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function FancyCursor() {
return () => {
window.removeEventListener("mousemove", moveCursor);
};
}, []);
}, [cursorControls, cursorX, cursorY, followerControls]);

return (
<>
Expand Down
102 changes: 51 additions & 51 deletions src/components/FeaturedProject.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -618,57 +618,57 @@ const Icons = {
),
};

const FeaturedProjects = ({ projects }) => {
return (
<div className="grid grid-cols-1 md:grid-cols-2 gap-8">
{projects.map((project, index) => (
<motion.div
key={index}
initial={{ opacity: 0, y: 50 }}
whileInView={{ opacity: 1, y: 0 }}
transition={{ duration: 0.5, delay: index * 0.1 }}
viewport={{ once: true }}
>
<MotionCard
className="h-full flex flex-col"
whileHover={{
scale: 1.05,
boxShadow: "0 8px 30px rgba(0,0,0,0.12)",
}}
transition={{
type: "spring",
stiffness: 400,
damping: 10,
}}
>
<CardContent className="p-6 flex-grow">
<h3 className="text-xl font-semibold mb-3">{project.name}</h3>
<p className="text-gray-700 dark:text-gray-300 mb-4">
{project.description}
</p>
<div className="mb-6 flex flex-wrap gap-2">
{project.technologies.map((tech, i) => (
<Badge key={i} variant="secondary">
{tech}
</Badge>
))}
</div>
<motion.a
href={project.link}
target="_blank"
rel="noopener noreferrer"
className="text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 font-medium flex items-center transition-colors duration-200 mt-auto"
whileHover={{ x: 5 }}
>
View Project <ExternalLinkIcon className="ml-1 h-4 w-4" />
</motion.a>
</CardContent>
</MotionCard>
</motion.div>
))}
</div>
);
};
// const FeaturedProjects = ({ projects }) => {
// return (
// <div className="grid grid-cols-1 md:grid-cols-2 gap-8">
// {projects.map((project, index) => (
// <motion.div
// key={index}
// initial={{ opacity: 0, y: 50 }}
// whileInView={{ opacity: 1, y: 0 }}
// transition={{ duration: 0.5, delay: index * 0.1 }}
// viewport={{ once: true }}
// >
// <MotionCard
// className="h-full flex flex-col"
// whileHover={{
// scale: 1.05,
// boxShadow: "0 8px 30px rgba(0,0,0,0.12)",
// }}
// transition={{
// type: "spring",
// stiffness: 400,
// damping: 10,
// }}
// >
// <CardContent className="p-6 flex-grow">
// <h3 className="text-xl font-semibold mb-3">{project.name}</h3>
// <p className="text-gray-700 dark:text-gray-300 mb-4">
// {project.description}
// </p>
// <div className="mb-6 flex flex-wrap gap-2">
// {project.technologies.map((tech, i) => (
// <Badge key={i} variant="secondary">
// {tech}
// </Badge>
// ))}
// </div>
// <motion.a
// href={project.link}
// target="_blank"
// rel="noopener noreferrer"
// className="text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 font-medium flex items-center transition-colors duration-200 mt-auto"
// whileHover={{ x: 5 }}
// >
// View Project <ExternalLinkIcon className="ml-1 h-4 w-4" />
// </motion.a>
// </CardContent>
// </MotionCard>
// </motion.div>
// ))}
// </div>
// );
// };

const files = [
{
Expand Down
1 change: 0 additions & 1 deletion src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import styles from "./Header.module.scss";
import { routes, display } from "../resources";
import { person, home, about, blog, work, gallery } from "../resources";

import { motion } from "framer-motion";
import { ModeToggle } from "./mode-toggle";
import { Separator } from "./ui/separator";

Expand Down
4 changes: 2 additions & 2 deletions src/components/InitTransition.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import useWindowSize from "@/hooks/useWindowSize";
import { motion } from "framer-motion";
import { useState } from "react";
import { useTranslation } from "react-i18next";
// import { useTranslation } from "react-i18next";

const blackBox = {
initial: {
Expand Down Expand Up @@ -48,7 +48,7 @@ const text = {

// const InitialTransition = ({ onComplete }) => {
const InitialTransition = () => {
const { t } = useTranslation();
// const { t } = useTranslation();
const { width, height } = useWindowSize();

// Scroll user to top to avoid showing the footer
Expand Down
6 changes: 3 additions & 3 deletions src/components/Mailchimp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Button, Flex, Heading, Input, Text } from "./once-ui/components";
import { Background } from "./once-ui/components/Background";
import { useState } from "react";

function debounce<T extends (...args: any[]) => void>(
function debounce<T extends (...args: unknown[]) => void>(
func: T,
delay: number
): T {
Expand All @@ -20,7 +20,7 @@ function debounce<T extends (...args: any[]) => void>(
export const Mailchimp = () => {
const [email, setEmail] = useState<string>("");
const [error, setError] = useState<string>("");
const [touched, setTouched] = useState<boolean>(false);
// const [touched, setTouched] = useState<boolean>(false); // Removed unused state

const validateEmail = (email: string): boolean => {
if (email === "") {
Expand All @@ -45,7 +45,7 @@ export const Mailchimp = () => {
const debouncedHandleChange = debounce(handleChange, 2000);

const handleBlur = () => {
setTouched(true);
// setTouched(true); // Removed unused state update
if (!validateEmail(email)) {
setError("Please enter a valid email address.");
}
Expand Down

0 comments on commit 694d296

Please sign in to comment.