-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from Judge-Paul/v1
V1
- Loading branch information
Showing
37 changed files
with
3,141 additions
and
267 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
Binary file not shown.
File renamed without changes
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import React, { Fragment, lazy } from "react"; | ||
import { BrowserRouter, Routes, Route } from "react-router-dom"; | ||
import lazyLoading from "./components/lazyLoading"; | ||
import Navbar from "./components/Navbar"; | ||
import Footer from "./components/Footer"; | ||
|
||
const Home = lazyLoading(() => import("./pages/Home")); | ||
const NotFound = lazyLoading(() => import("./pages/NotFound")); | ||
const Create = lazyLoading(() => import("./pages/Create")); | ||
|
||
// Layout component for rendering routes with navbar and footer | ||
const Layout = ({ children }) => ( | ||
<div> | ||
<Navbar /> | ||
{children} | ||
<Footer /> | ||
</div> | ||
); | ||
|
||
export default function App() { | ||
return ( | ||
<BrowserRouter> | ||
<Routes> | ||
<Route | ||
element={ | ||
<Layout> | ||
<Home /> | ||
</Layout> | ||
} | ||
path="/" | ||
/> | ||
<Route | ||
element={ | ||
<Layout> | ||
<Create /> | ||
</Layout> | ||
} | ||
path="/create" | ||
/> | ||
<Route | ||
element={ | ||
<Layout> | ||
<NotFound /> | ||
</Layout> | ||
} | ||
path="/*" | ||
/> | ||
</Routes> | ||
</BrowserRouter> | ||
); | ||
} |
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import React from "react"; | ||
import { FaGithub, FaTwitter, FaYoutube, FaHashnode } from "react-icons/fa6"; | ||
import { Link } from "react-router-dom"; | ||
|
||
export default function Footer() { | ||
return ( | ||
<footer className="bg-[#9fcaff] font-workSans backdrop-blur-md pt-12 pb-6"> | ||
<div className="mx-auto px-4 overflow-hidden sm:px-6 lg:px-8 pt-8 border-t-2 border-white"> | ||
<nav | ||
className="-mx-5 -my-2 flex flex-wrap justify-center" | ||
aria-label="Footer" | ||
> | ||
<Link | ||
to="#" | ||
className="px-5 py-2 text-base font-semibold text-blue-700 hover:text-blue-500" | ||
> | ||
About | ||
</Link> | ||
<Link | ||
to="#" | ||
className="px-5 py-2 text-base font-semibold text-blue-700 hover:text-blue-500" | ||
> | ||
Pricing | ||
</Link> | ||
<Link | ||
to="https://github.com/Judge-Paul/coverwrite-ai" | ||
className="px-5 py-2 text-base font-semibold text-blue-700 hover:text-blue-500" | ||
> | ||
Contributing | ||
</Link> | ||
</nav> | ||
<div className="mt-8 flex justify-center space-x-4"> | ||
<Link | ||
to="https://x.com/jadge_dev" | ||
className="text-blue-700 hover:bg-blue-500 px-1.5 py-1 rounded-md" | ||
> | ||
<span className="sr-only">Twitter</span> | ||
<FaTwitter className="h-6 w-6" /> | ||
</Link> | ||
<Link | ||
to="https://github.com/Judge-Paul" | ||
className="text-blue-700 hover:bg-blue-500 px-1.5 py-1 rounded-md" | ||
> | ||
<span className="sr-only">GitHub</span> | ||
<FaGithub className="h-6 w-6" /> | ||
</Link> | ||
<Link | ||
to="https://hashnode.com/@jadge" | ||
className="text-blue-700 hover:bg-blue-500 px-1.5 py-1 rounded-md" | ||
> | ||
<span className="sr-only">Hashnode</span> | ||
<FaHashnode className="h-6 w-6" /> | ||
</Link> | ||
<Link | ||
to="https://youtube.com/@jadge_dev23" | ||
className="text-blue-700 hover:bg-blue-500 px-1.5 py-1 rounded-md" | ||
> | ||
<span className="sr-only">Youtube</span> | ||
<FaYoutube className="h-6 w-6" /> | ||
</Link> | ||
</div> | ||
<div className="text-center mt-10"> | ||
<Link | ||
to="https://github.com/Judge-Paul/coverwrite-ai/issues" | ||
className="mt-5 text-base text-blue-700" | ||
> | ||
Have a feature you want to add or noticed a bug?{" "} | ||
<span className="hover:text-blue-500">Create an Issue</span> | ||
</Link> | ||
</div> | ||
<p className="mt-5 text-center text-base text-blue-700"> | ||
© 2023 CoverWriteAI. All rights reserved. | ||
</p> | ||
</div> | ||
</footer> | ||
); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React, { useState } from "react"; | ||
import axios from "axios"; | ||
|
||
function Form() { | ||
const [prompt, setPrompt] = useState(""); | ||
const [generatedText, setGeneratedText] = useState(""); | ||
|
||
const handleSubmit = async (e) => { | ||
e.preventDefault(); | ||
|
||
try { | ||
const response = await axios.post("http://localhost:3000/generate", { | ||
prompt, | ||
}); | ||
setGeneratedText(response.data.result[0].candidates[0].output); | ||
} catch (error) { | ||
console.error(error); | ||
// Handle error | ||
} | ||
}; | ||
|
||
return ( | ||
<div> | ||
<form onSubmit={handleSubmit}> | ||
<input | ||
type="text" | ||
value={prompt} | ||
onChange={(e) => setPrompt(e.target.value)} | ||
placeholder="Enter your prompt" | ||
className="block border border-black mt-20" | ||
/> | ||
<button | ||
type="submit" | ||
className="bg-blue-500 rounded-sm text-white p-1.5 mt-5" | ||
> | ||
Generate Text | ||
</button> | ||
</form> | ||
{generatedText && ( | ||
<div> | ||
<h2>Generated Text:</h2> | ||
<p className="whitespace-pre w-96">{generatedText}</p> | ||
</div> | ||
)} | ||
</div> | ||
); | ||
} | ||
|
||
export default Form; |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from "react"; | ||
|
||
export default function Home() { | ||
return ( | ||
<div> | ||
</div> | ||
) | ||
} |
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
Oops, something went wrong.
864113c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
coverwrite-ai – ./
coverwrite.vercel.app
coverwrite-ai-git-main-judge-paul.vercel.app
coverwrite-ai-judge-paul.vercel.app