Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing useState Error,Fixing Parameter 'event' implicitly has an 'any' type,Fixing Link 'rel' attribute should include 'noopener' Warning(for security reasons) #121

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
import Image from "next/image";
import Link from "next/link";
import React, { useState } from "react";

import Footer from "../components/Footer";
import Header from "../components/Header";
import SquigglyLines from "../components/SquigglyLines";

export default function HomePage() {
const [initialIdeas, setInitialIdeas] = useState(""); // State to store user input

const handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) => {
setInitialIdeas(event.target.value); // Update state on input change
};

return (
<div className="flex max-w-6xl mx-auto flex-col items-center justify-center py-2 min-h-screen">
<Header />
<main className="flex flex-1 w-full flex-col items-center justify-center text-center px-4 sm:mt-20 mt-20 background-gradient">
<a
href="https://vercel.fyi/roomGPT"
target="_blank"
rel="noreferrer"
rel="noopener noreferrer"
className="border border-gray-700 rounded-lg py-2 px-4 text-gray-400 text-sm mb-5 transition duration-300 ease-in-out"
>
Clone and deploy your own with{" "}
Expand All @@ -26,10 +34,26 @@ export default function HomePage() {
</span>{" "}
for everyone.
</h1>
<h2 className="mx-auto mt-12 max-w-xl text-lg sm:text-gray-400 text-gray-500 leading-7">
<h2 className="mx-auto mt-12 max-w-xl text-lg sm:text-gray-400 text-gray-500 leading-7">
Take a picture of your room and see how your room looks in different
themes. 100% free – remodel your room today.
</h2>

{/* New input field for user ideas */}
<div className="mt-8">
<label htmlFor="initial-ideas" className="block text-gray-300 mb-2">
ANY INITIAL IDEAS:
</label>
<input
id="initial-ideas"
type="text"
value={initialIdeas}
onChange={handleInputChange}
placeholder="Enter your ideas here..."
className="border border-gray-700 rounded-lg py-2 px-4 text-gray-400"
/>
</div>

<Link
className="bg-blue-600 rounded-xl text-white font-medium px-4 py-3 sm:mt-10 mt-8 hover:bg-blue-500 transition"
href="/dream"
Expand Down