Fix improper variable defining

This commit is contained in:
Lncvrt committed 2025-07-30 19:29:56 -07:00
1 parent 6a1bad7c39
commit b8a4ef3754
1 file changed
+6 -7
+6 -7
View File
@@ -1,18 +1,17 @@
import { useState } from 'react'
import OptionButtons from '../components/OptionButtons'
let project_type = "site"
// This is here so that a warning doesn't show cuz that annoys me
console.log(project_type)
export default function Home () {
const [projectType, setProjectType] = useState<string>('website')
return (
<>
<div className='container'>
<p>Project Type: {projectType}</p>
<OptionButtons
buttons={[
{ label: "Website", onClick: () => project_type = "site" },
{ label: "Web Server", onClick: () => project_type = "server" },
{ label: 'Website', onClick: () => setProjectType('website') },
{ label: 'Web Server', onClick: () => setProjectType('webserver') }
]}
/>
</div>