Skip to content

Commit 4fcb55b

Browse files
committed
Linting files
1 parent f8b11f6 commit 4fcb55b

31 files changed

+1001
-796
lines changed

src/App.jsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import Hero from './sections/Hero.jsx';
2-
import About from './sections/About.jsx';
3-
import Footer from './sections/Footer.jsx';
4-
import Navbar from './sections/Navbar.jsx';
5-
import Contact from './sections/Contact.jsx';
1+
import Hero from "./sections/Hero.jsx";
2+
import About from "./sections/About.jsx";
3+
import Footer from "./sections/Footer.jsx";
4+
import Navbar from "./sections/Navbar.jsx";
5+
import Contact from "./sections/Contact.jsx";
66
// import Clients from './sections/Clients.jsx';
7-
import Projects from './sections/Projects.jsx';
8-
import WorkExperience from './sections/Experience.jsx';
7+
import Projects from "./sections/Projects.jsx";
8+
import WorkExperience from "./sections/Experience.jsx";
99

1010
const App = () => {
1111
return (
@@ -22,4 +22,4 @@ const App = () => {
2222
);
2323
};
2424

25-
export default App;
25+
export default App;

src/components/Alert.jsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
const Alert = ({ type, text }) => {
2-
const alertTypeClass = type === 'danger' ? 'bg-red-800' : 'bg-blue-800';
3-
const alertLabelClass = type === 'danger' ? 'bg-red-500' : 'bg-blue-500';
4-
const alertMessage = type === 'danger' ? 'Failed' : 'Success';
2+
const alertTypeClass = type === "danger" ? "bg-red-800" : "bg-blue-800";
3+
const alertLabelClass = type === "danger" ? "bg-red-500" : "bg-blue-500";
4+
const alertMessage = type === "danger" ? "Failed" : "Success";
55

66
return (
77
<div className="fixed bottom-5 right-5 flex justify-center items-center z-50">
88
<div
99
className={`p-5 ${alertTypeClass} items-center text-indigo-100 leading-none lg:rounded-full flex lg:inline-flex rounded-md`}
10-
role="alert">
11-
<p className={`flex rounded-full ${alertLabelClass} uppercase px-2 py-1 text-xs font-semibold mr-3`}>
10+
role="alert"
11+
>
12+
<p
13+
className={`flex rounded-full ${alertLabelClass} uppercase px-2 py-1 text-xs font-semibold mr-3`}
14+
>
1215
{alertMessage}
1316
</p>
1417
<p className="mr-2 text-left">{text}</p>

src/components/AnimatedCoding.jsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
/* eslint-disable react/display-name */
2-
import React from 'react';
3-
import { motion } from 'framer-motion';
4-
import svgList from '../constants/icons';
2+
import React from "react";
3+
import { motion } from "framer-motion";
4+
import svgList from "../constants/icons";
55

66
// Memoized icon component to prevent unnecessary re-renders
77
const Icon = React.memo(({ svg, index }) => (
88
<motion.div
99
className="relative w-8 h-8 sm:w-12 sm:h-12"
10-
whileHover={{
11-
scale: 1.2,
10+
whileHover={{
11+
scale: 1.2,
1212
rotate: 10,
13-
transition: { duration: 0.2 }
13+
transition: { duration: 0.2 },
1414
}}
15-
whileTap={{
16-
scale: 0.8,
15+
whileTap={{
16+
scale: 0.8,
1717
rotate: -10,
18-
transition: { duration: 0.2 }
18+
transition: { duration: 0.2 },
1919
}}
2020
>
2121
<img
@@ -24,7 +24,7 @@ const Icon = React.memo(({ svg, index }) => (
2424
className="w-full h-full object-contain"
2525
style={{
2626
filter: "drop-shadow(0 0 2px rgba(0, 0, 0, 0.2))",
27-
willChange: "transform"
27+
willChange: "transform",
2828
}}
2929
/>
3030
</motion.div>
@@ -45,12 +45,12 @@ const AnimatedCoding = () => {
4545
className="relative w-full max-w-[360px] h-full grid grid-cols-5 gap-4"
4646
initial={{ y: 0 }}
4747
animate={{ y: -contentHeight }}
48-
transition={{
48+
transition={{
4949
duration: animationDuration,
5050
repeat: Infinity,
51-
ease: 'linear'
51+
ease: "linear",
5252
}}
53-
style={{ willChange: 'transform' }}
53+
style={{ willChange: "transform" }}
5454
>
5555
{doubledSvgList.map((svg, index) => (
5656
<div
@@ -65,4 +65,4 @@ const AnimatedCoding = () => {
6565
);
6666
};
6767

68-
export default AnimatedCoding;
68+
export default AnimatedCoding;

src/components/Button.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const Button = ({ name, isBeam = false, containerClass = '' }) => (
1+
const Button = ({ name, isBeam = false, containerClass = "" }) => (
22
<button className={`btn ${containerClass}`}>
33
{isBeam && (
44
<span className="relative flex h-3 w-3">

src/components/Cube.jsx

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
/* eslint-disable react/no-unknown-property */
2-
import { useRef, useEffect } from 'react';
3-
import { Float, useGLTF, useTexture } from '@react-three/drei';
4-
import gsap from 'gsap';
2+
import { useRef, useEffect } from "react";
3+
import { Float, useGLTF, useTexture } from "@react-three/drei";
4+
import gsap from "gsap";
55

6-
const Cube = ({ position = [9, -4, 0], rotation = [2.6, 0.8, -1.8], scale = 0.74, ...props }) => {
7-
const { nodes } = useGLTF('./models/cube.glb');
8-
const texture = useTexture('./textures/cube.png');
6+
const Cube = ({
7+
position = [9, -4, 0],
8+
rotation = [2.6, 0.8, -1.8],
9+
scale = 0.74,
10+
...props
11+
}) => {
12+
const { nodes } = useGLTF("./models/cube.glb");
13+
const texture = useTexture("./textures/cube.png");
914
const cubeRef = useRef();
1015

1116
useEffect(() => {
@@ -23,7 +28,7 @@ const Cube = ({ position = [9, -4, 0], rotation = [2.6, 0.8, -1.8], scale = 0.74
2328

2429
const handlePointerOver = () => {
2530
if (cubeRef.current) {
26-
gsap.to(cubeRef.current.rotation, { x: '+=2', y: '+=2', duration: 0.8 });
31+
gsap.to(cubeRef.current.rotation, { x: "+=2", y: "+=2", duration: 0.8 });
2732
}
2833
};
2934

@@ -39,7 +44,13 @@ const Cube = ({ position = [9, -4, 0], rotation = [2.6, 0.8, -1.8], scale = 0.74
3944

4045
return (
4146
<Float floatIntensity={2}>
42-
<group position={position} rotation={rotation} scale={scale} dispose={null} {...props}>
47+
<group
48+
position={position}
49+
rotation={rotation}
50+
scale={scale}
51+
dispose={null}
52+
{...props}
53+
>
4354
<mesh
4455
ref={cubeRef}
4556
castShadow
@@ -55,6 +66,6 @@ const Cube = ({ position = [9, -4, 0], rotation = [2.6, 0.8, -1.8], scale = 0.74
5566
);
5667
};
5768

58-
useGLTF.preload('./models/cube.glb');
69+
useGLTF.preload("./models/cube.glb");
5970

6071
export default Cube;

src/components/DemoComputer.jsx

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
/* eslint-disable react/no-unknown-property */
2-
import { useRef, useEffect } from 'react';
3-
import { useGLTF, useAnimations, useVideoTexture } from '@react-three/drei';
4-
import gsap from 'gsap';
5-
import { useGSAP } from '@gsap/react';
2+
import { useRef, useEffect } from "react";
3+
import { useGLTF, useAnimations, useVideoTexture } from "@react-three/drei";
4+
import gsap from "gsap";
5+
import { useGSAP } from "@gsap/react";
66

77
const DemoComputer = (props) => {
88
const group = useRef();
9-
const { nodes, materials, animations } = useGLTF('./models/computer.glb');
9+
const { nodes, materials, animations } = useGLTF("./models/computer.glb");
1010
const { actions } = useAnimations(animations, group);
1111

12-
const txt = useVideoTexture(props.texture || './textures/project/project1.mp4');
12+
const txt = useVideoTexture(
13+
props.texture || "./textures/project/project1.mp4",
14+
);
1315

1416
useEffect(() => {
1517
if (txt) {
@@ -21,7 +23,7 @@ const DemoComputer = (props) => {
2123
const rotationTween = gsap.from(group.current.rotation, {
2224
y: Math.PI / 2,
2325
duration: 1,
24-
ease: 'power3.out',
26+
ease: "power3.out",
2527
});
2628

2729
return () => {
@@ -34,14 +36,20 @@ const DemoComputer = (props) => {
3436
<group name="Scene">
3537
<mesh
3638
name="monitor-screen"
37-
geometry={nodes['monitor-screen'].geometry}
38-
material={nodes['monitor-screen'].material}
39+
geometry={nodes["monitor-screen"].geometry}
40+
material={nodes["monitor-screen"].material}
3941
position={[0.127, 1.831, 0.511]}
4042
rotation={[1.571, -0.005, 0.031]}
41-
scale={[0.661, 0.608, 0.401]}>
43+
scale={[0.661, 0.608, 0.401]}
44+
>
4245
<meshBasicMaterial map={txt} toneMapped={false} />
4346
</mesh>
44-
<group name="RootNode" position={[0, 1.093, 0]} rotation={[-Math.PI / 2, 0, -0.033]} scale={0.045}>
47+
<group
48+
name="RootNode"
49+
position={[0, 1.093, 0]}
50+
rotation={[-Math.PI / 2, 0, -0.033]}
51+
scale={0.045}
52+
>
4553
<group
4654
name="Screen001"
4755
position={[5.658, 1.643, 0.812]}
@@ -947,45 +955,46 @@ const DemoComputer = (props) => {
947955
name="Monitor-B-_computer_0"
948956
position={[0.266, 1.132, 0.051]}
949957
rotation={[0, -0.033, 0]}
950-
scale={[0.042, 0.045, 0.045]}>
958+
scale={[0.042, 0.045, 0.045]}
959+
>
951960
<mesh
952961
name="Monitor-B-_computer_0_1"
953-
geometry={nodes['Monitor-B-_computer_0_1'].geometry}
962+
geometry={nodes["Monitor-B-_computer_0_1"].geometry}
954963
material={materials.computer}
955964
/>
956965
<mesh
957966
name="Monitor-B-_computer_0_2"
958-
geometry={nodes['Monitor-B-_computer_0_2'].geometry}
967+
geometry={nodes["Monitor-B-_computer_0_2"].geometry}
959968
material={materials.base__0}
960969
/>
961970
<mesh
962971
name="Monitor-B-_computer_0_3"
963-
geometry={nodes['Monitor-B-_computer_0_3'].geometry}
972+
geometry={nodes["Monitor-B-_computer_0_3"].geometry}
964973
material={materials.Material_36}
965974
/>
966975
<mesh
967976
name="Monitor-B-_computer_0_4"
968-
geometry={nodes['Monitor-B-_computer_0_4'].geometry}
977+
geometry={nodes["Monitor-B-_computer_0_4"].geometry}
969978
material={materials.Material_35}
970979
/>
971980
<mesh
972981
name="Monitor-B-_computer_0_5"
973-
geometry={nodes['Monitor-B-_computer_0_5'].geometry}
982+
geometry={nodes["Monitor-B-_computer_0_5"].geometry}
974983
material={materials.Material_34}
975984
/>
976985
<mesh
977986
name="Monitor-B-_computer_0_6"
978-
geometry={nodes['Monitor-B-_computer_0_6'].geometry}
987+
geometry={nodes["Monitor-B-_computer_0_6"].geometry}
979988
material={materials.keys}
980989
/>
981990
<mesh
982991
name="Monitor-B-_computer_0_7"
983-
geometry={nodes['Monitor-B-_computer_0_7'].geometry}
992+
geometry={nodes["Monitor-B-_computer_0_7"].geometry}
984993
material={materials.keys2}
985994
/>
986995
<mesh
987996
name="Monitor-B-_computer_0_8"
988-
geometry={nodes['Monitor-B-_computer_0_8'].geometry}
997+
geometry={nodes["Monitor-B-_computer_0_8"].geometry}
989998
material={materials.Material_37}
990999
/>
9911000
</group>
@@ -994,6 +1003,6 @@ const DemoComputer = (props) => {
9941003
);
9951004
};
9961005

997-
useGLTF.preload('./models/computer.glb');
1006+
useGLTF.preload("./models/computer.glb");
9981007

9991008
export default DemoComputer;

src/components/Developer.jsx

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,38 @@
11
/* eslint-disable react/no-unknown-property */
2-
import React, { useEffect, useRef, useMemo } from 'react';
3-
import { useGraph } from '@react-three/fiber';
4-
import { useAnimations, useFBX, useGLTF } from '@react-three/drei';
5-
import { SkeletonUtils } from 'three-stdlib';
2+
import React, { useEffect, useRef, useMemo } from "react";
3+
import { useGraph } from "@react-three/fiber";
4+
import { useAnimations, useFBX, useGLTF } from "@react-three/drei";
5+
import { SkeletonUtils } from "three-stdlib";
66

7-
const Developer = ({ animationName = 'idle', ...props }) => {
7+
const Developer = ({ animationName = "idle", ...props }) => {
88
const group = useRef();
9-
const { scene } = useGLTF('./models/animations/developer.glb');
9+
const { scene } = useGLTF("./models/animations/developer.glb");
1010
const clone = useMemo(() => SkeletonUtils.clone(scene), [scene]);
1111
const { nodes, materials } = useGraph(clone);
1212

13-
const { animations: idleAnimation } = useFBX('./models/animations/idle.fbx');
14-
const { animations: saluteAnimation } = useFBX('./models/animations/salute.fbx');
15-
const { animations: clappingAnimation } = useFBX('./models/animations/clapping.fbx');
16-
const { animations: victoryAnimation } = useFBX('./models/animations/victory.fbx');
13+
const { animations: idleAnimation } = useFBX("./models/animations/idle.fbx");
14+
const { animations: saluteAnimation } = useFBX(
15+
"./models/animations/salute.fbx",
16+
);
17+
const { animations: clappingAnimation } = useFBX(
18+
"./models/animations/clapping.fbx",
19+
);
20+
const { animations: victoryAnimation } = useFBX(
21+
"./models/animations/victory.fbx",
22+
);
1723

18-
idleAnimation[0].name = 'idle';
19-
saluteAnimation[0].name = 'salute';
20-
clappingAnimation[0].name = 'clapping';
21-
victoryAnimation[0].name = 'victory';
24+
idleAnimation[0].name = "idle";
25+
saluteAnimation[0].name = "salute";
26+
clappingAnimation[0].name = "clapping";
27+
victoryAnimation[0].name = "victory";
2228

2329
const { actions } = useAnimations(
24-
[idleAnimation[0], saluteAnimation[0], clappingAnimation[0], victoryAnimation[0]],
30+
[
31+
idleAnimation[0],
32+
saluteAnimation[0],
33+
clappingAnimation[0],
34+
victoryAnimation[0],
35+
],
2536
group,
2637
);
2738

@@ -43,10 +54,10 @@ const Developer = ({ animationName = 'idle', ...props }) => {
4354
);
4455
};
4556

46-
useGLTF.preload('./models/animations/developer.glb');
47-
useFBX.preload('./models/animations/idle.fbx');
48-
useFBX.preload('./models/animations/salute.fbx');
49-
useFBX.preload('./models/animations/clapping.fbx');
50-
useFBX.preload('./models/animations/victory.fbx');
57+
useGLTF.preload("./models/animations/developer.glb");
58+
useFBX.preload("./models/animations/idle.fbx");
59+
useFBX.preload("./models/animations/salute.fbx");
60+
useFBX.preload("./models/animations/clapping.fbx");
61+
useFBX.preload("./models/animations/victory.fbx");
5162

52-
export default Developer;
63+
export default Developer;

0 commit comments

Comments
 (0)