first commit

This commit is contained in:
Kenneth Jannette
2024-01-11 18:24:41 -06:00
commit 4c1fb67383
103 changed files with 29954 additions and 0 deletions

View File

@@ -0,0 +1,127 @@
import { useState } from "react";
import Button from "../../pageElements/Button";
import { Link, useNavigate } from "react-router-dom";
import Col from "react-bootstrap/Col";
import Form from "react-bootstrap/Form";
import Row from "react-bootstrap/Row";
import { demofields } from "../../Constants/Fields/DemoFields";
import { splitEvery } from "../../Utils/Array";
import TextInput from "../../pageElements/TextInput";
import { objectMap } from "../../Utils/Object";
import { v4 as uuidv4 } from "uuid";
import {
getFormDataDefaults,
getValidatedFormData,
handleFormDataChange,
isFormDataHasErrors,
} from "../../Utils/Form";
import { db } from "../../firebase";
import { collection, setDoc, doc } from "firebase/firestore";
import "../../styles/demo-request-page.scss";
const DemoRequestPage = () => {
const navigate = useNavigate();
const [data, setData] = useState(getFormDataDefaults(demofields));
const [isBusy, setIsBusy] = useState();
const fieldsChunkSize = 2;
const handleChangeInput = (e, name) => {
const newData = handleFormDataChange(e, name, data, demofields);
if (newData !== null) {
setData(newData);
}
};
const validateData = () => {
const newData = getValidatedFormData(data, demofields);
const hasErrors = isFormDataHasErrors(newData);
setData(newData);
return hasErrors ? null : objectMap(({ value }) => value, newData);
};
async function saveUserData(dataValues) {
console.log("saveUserData dataValues", dataValues);
const { firstName, lastName, firm, telephone, email } = dataValues;
const requestDate = new Date();
dataValues["requestDate"] = requestDate;
const requestId = uuidv4();
try {
const demoRef = collection(db, "demorequests");
await setDoc(doc(demoRef, requestId), dataValues);
} catch (error) {
console.log(`Error saving request data to db: ${error}`);
}
}
async function handleRequestDemo() {
console.log("handlerequest demo");
const dataValues = validateData();
if (dataValues === null) {
return;
}
saveUserData(dataValues);
navigate("/");
}
return (
<div className="signup-super-container">
<div className="signup-sub-container">
<div className="signup-header">
<h2 className="signup-header-text">
Revolutionize Your Practice: Request A Demo
</h2>
<p className="requestdemo-para">
Enter your information below we will contact you to schedule
</p>
</div>
<Form className="demo-request-form">
{splitEvery(Object.keys(demofields), fieldsChunkSize).map(
(names, j) => (
<Row key={`row${j}`}>
{names.map((name, i) => (
<Col
key={`${name}${i + fieldsChunkSize * j}`}
className="mb-3"
>
<TextInput
name={name}
value={data[name].value}
onChange={(e) => handleChangeInput(e, name)}
error={data[name].error}
message={data[name].message}
label={
data[name].value.length === 0
? demofields[name].label
: ""
}
type={demofields[name].type}
values={demofields[name].values}
disabled={isBusy}
/>
</Col>
))}
</Row>
)
)}
</Form>
<div className="signup-button-box">
<Button
className="primary-button"
type="button"
size="lg"
onClick={handleRequestDemo}
disabled={isBusy}
labelText="Request Demo"
/>
<div className="mt-3">
<span>
<Link to="/signup">Go to signup</Link>
</span>
</div>
</div>
</div>
</div>
);
};
export default DemoRequestPage;

View File

@@ -0,0 +1,250 @@
import Button from "../../pageElements/Button";
import suitAI from "../../Assets/Images/suitAI.png";
import laptop from "../../Assets/Images/laptop.png";
import arrow from "../../Assets/Images/Arrow.png";
import scales_centered from "../../Assets/Images/scales_centered.png";
import hand_clear from "../../Assets/Images/hand_clear.png";
import hand_rework6 from "../../Assets/Images/hand_rework6.png";
import gavel_clear from "../../Assets/Images/gavel_clear.png";
import Group80 from "../../Assets/Images/Group80.png";
import { useNavigate } from "react-router-dom";
import "../../styles/homepage.scss";
const HomePage = () => {
const navigate = useNavigate();
const handleNavigate = () => {
navigate("/signup");
};
const handleLogin = () => {
navigate("/login");
};
const handleDemo = () => {
navigate("/demorequestpage");
};
return (
<>
<div className="homepage-container">
<section
className="section-1"
style={{ backgroundImage: `url(${suitAI})`, backgroundSize: "cover" }}
>
<div className="first-section-subcontainer">
<div className="row upper-row-one">
<div className="col-md-12">
<div className="heading-one-container">
<h1 className="heading-1">
Novodraft: Leverage AI to draft discovery faster <i>and </i>{" "}
smarter.
</h1>
</div>
<p className="text-block-1">
Responses ready to serve in minutes.
</p>
<p className="text-block-two">
Reclaim hours every week. Boost your billables or spend more
time growing your practice.
</p>
<div className="try-it-button-box">
<Button
className="primary-button homepage-button"
labelText="Try It For Free"
onClick={handleNavigate}
/>
</div>
</div>
</div>
</div>
</section>
{/* Section 2 */}
<section className="section-2">
<div className="home-row">
<div className="home-col-50">
<div className="heading-2-mobile-box">
<h2 className="heading-2-mobile">
Made by Attorneys, for Attorneys
</h2>
</div>
<div className="pad-2">
<img
src={laptop}
alt="image of a laptop computer"
className="img-2"
/>
</div>
</div>
<div className="home-col-50">
<div className="pad-2">
<h2 className="heading-2">Made by Attorneys, for Attorneys</h2>
<div className="text-block-2-box">
<p className="text-block-2">
Legal tech built by people that get it.
</p>
</div>
<p className="section-two-body">
Novodraft understands the demands on your time. For example,
that discovery request on your desk. With a few clicks, and
Novodraft's AI assistant on the task, you can draft a
ready-to-serve response in minutes. It's as easy as uploading
a .pdf file.
</p>
<p className="section-two-body">
Novodraft cuts through a mire of rote tasks, but does much
more than automate.
</p>
<p className="section-two-body">
IntelliDraft AI technology powers persuasive arguments and
boosts bland, boilerplate objections. Configurable for level
of authoritative citation and for infering factual context
from pleadings and briefs. Use it to augment your drafting as
much or as little as you prefer.
</p>
<div className="home-link-box">
<a className="link">
Explore Novodraft
<img src={arrow} className="img-1" alt="" />
</a>
</div>
</div>
</div>
</div>
</section>
{/* Section 3 */}
<section className="section-3">
<div className="section-three-header-box">
<h2 className="section-three-header">
AI-Powered Legal Drafting Technology{" "}
</h2>
<p className="section-three-subhead">
Created by litigators with law-centric AI at its core to give you
an edge.
</p>
</div>
<div className="card-section-container">
{/*********** CARD ONE *********** */}
<div className="home-card">
<div className="card-image-container">
<img src={gavel_clear} alt="" className="card-image" />
</div>
<div className="card-body">
<div className="card-upper-box">
<div className="home-card-title">
<h3 className="foo-card-title">Proactive Alerts</h3>
<div className="home-card-divider"></div>
</div>
</div>
<div className="home-card-text-box">
<p className="card-texts">
Your NovoDash displays important deadlines, sends email/SMS
alerts, and will auto-draft responses and remind you to
serve them.
</p>
</div>
</div>
</div>
{/*********** CARD TWO *********** */}
<div className="home-card">
<div className="card-image-container">
<img
src={scales_centered}
alt=""
width="100%"
className="card-image"
/>
</div>
<div className="card-body">
<div className="card-upper-box">
<div className="home-card-title">
<h3 className="foo-card-title">Discovery Responses</h3>
<div className="home-card-divider"></div>
</div>
</div>
<div className="home-card-text-box">
<p className="card-texts">
Novodraft's AI drafts responses complete with compelling
arguments about what you choose not to disclose. Finished in
minutes with a .docx file for service.
</p>
</div>
</div>
</div>
{/*********** CARD THREE *********** */}
<div className="home-card">
<div className="card-image-container">
<img
src={hand_rework6}
alt=""
width="100%"
className="card-image"
/>
</div>
<div className="card-body">
<div className="card-upper-box">
<div className="home-card-title">
<h3 className="foo-card-title">Discovery Requests</h3>
<div className="home-card-divider"></div>
</div>
</div>
<div className="home-card-text-box">
<p className="card-texts">
Generate discovery requests with a few clicks, or select
manually from a comprehensive request library. Done in a
heartbeat, with a .docx for review and service.
</p>
</div>
</div>
</div>
</div>
</section>
<section className="section-5 py-5">
<div
className="home-test-container"
style={{
backgroundImage: `url(${Group80})`,
backgroundSize: "cover",
}}
>
<div className="row">
<div className="col-md-6">
<div className="bottom-header-box">
<h4 className="heading-6">
Questions about our products and services? Were here to
answer!
</h4>
<h4 className="heading-6-mobile">
Questions about our products and services?
</h4>
<h4 className="heading-6-mobile">Were here to answer!</h4>
</div>
<h6 className="foo-heading">
Let us show you how Novodraft will revolutionize your
practice. Join our growing base of satisfied Novodrafters.
</h6>
</div>
<div className="col-md-6 d-flex">
<button className="button-2" onClick={handleDemo}>
Request a demo
</button>
<button className="button-2" onClick={handleLogin}>
Go to product login
</button>
</div>
</div>
</div>
</section>
</div>
</>
);
};
export default HomePage;