-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ProgrammerXD
authored and
ProgrammerXD
committed
Dec 24, 2023
1 parent
c9fb987
commit 6397f30
Showing
37 changed files
with
312 additions
and
123 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,76 @@ | ||
import React from 'react' | ||
import styles from '../page.module.css' | ||
import Model from './ModelObj.js' | ||
import React, { useEffect, useState } from 'react'; | ||
import styles from '../page.module.css'; | ||
import Model from './ModelObj.js'; | ||
|
||
const SectionA = () => { | ||
return ( | ||
<> | ||
<div className={`${styles.container} ${styles.cA}`}> | ||
<div className={`${styles.block} ${styles.bA}`}> | ||
<h1>Debugging My House</h1> | ||
{/* <p>I am 19 years old Web Developer, Codding is the thing in which I was always interested in | ||
and I am always ready to grab new skills. I am a self-taught developer, | ||
Constantly working on my Skills while | ||
Gaining a Solid Knowledge & Understanding in | ||
Development & Communication.</p> */} | ||
<p>Found Some Glitches in Wardrobe</p> | ||
</div> | ||
<Model /> | ||
|
||
</div> | ||
</> | ||
) | ||
} | ||
|
||
export default SectionA | ||
const [text, setText] = useState(''); | ||
const arr = ['Website', 'Bedroom', 'Balcony' , 'Kitchen' , 'Teddy' , 'Shoes' , 'Potato' , 'Fridge' , 'Computer' , 'Wardrobe']; | ||
const [counter, setCounter] = useState(0); | ||
var isTextEmpty = false; | ||
|
||
useEffect(() => { | ||
const intervalId = setInterval(() => { | ||
setCounter(prevCounter => (prevCounter + 1) % arr.length); | ||
}, 2000); | ||
|
||
return () => { | ||
clearInterval(intervalId); // Clean up the interval on component unmount | ||
}; | ||
}, [arr.length]); | ||
|
||
useEffect(() => { | ||
let intervalId; | ||
const clearText = () => { | ||
let index = 0; | ||
intervalId = setInterval(() => { | ||
if (text.length > 0) { | ||
setText(prevText => prevText.slice(0, -1)); // Remove one character at a time | ||
} else { | ||
clearInterval(intervalId); | ||
isTextEmpty = true; | ||
index = (index + 1) % arr.length; | ||
setText(arr[index]); // Set new text from the array | ||
} | ||
}, 250); // Speed of deletion, adjust as needed | ||
}; | ||
|
||
clearText(); | ||
|
||
return() => { | ||
if(isTextEmpty){ | ||
clearInterval(intervalId); | ||
setText(arr[counter]) | ||
let charArr = []; | ||
let charStr; | ||
|
||
arr[counter].split("").forEach((char , index) => { | ||
charArr.push(...char) | ||
charStr = charArr.join("") | ||
|
||
setText(charStr) | ||
console.log(charStr) | ||
}) | ||
|
||
console.log(charArr) | ||
console.log(charStr) | ||
}else{ | ||
clearInterval(intervalId); | ||
|
||
} | ||
} | ||
}, [counter, arr]); | ||
|
||
return ( | ||
<> | ||
<div className={`${styles.container} ${styles.cA}`} id='home'> | ||
<div className={`${styles.block} ${styles.bA}`}> | ||
<h1>Debugging My House</h1> | ||
<p>Found Some Glitches in {text}</p> | ||
</div> | ||
<Model /> | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
export default SectionA; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,6 +87,7 @@ | |
margin: 0 ; | ||
padding: 0; | ||
font-family: lato; | ||
scroll-behavior: smooth; | ||
|
||
} | ||
*::selection{ | ||
|
Oops, something went wrong.