-
-
-
-
-
-
-
+
+
+
);
}
-function JobList(props) {
- return (
- <>
- {props.jobs.map((item) => {
- return (
-
-
{item.employer}
-
{item.jobTitle}
-
- {item.employmentStart} - {item.employmentEnd}
-
-
{item.jobDescription}
-
- );
- })}
- >
- );
-}
-
function JobForm({ isActive, jobs, setJobs }) {
const [employer, setEmployer] = useState("");
const [jobTitle, setJobTitle] = useState("");
@@ -54,7 +28,6 @@ function JobForm({ isActive, jobs, setJobs }) {
const formStyle = {
display: "flex",
flexDirection: "column",
- width: "30vw",
};
function clear() {
@@ -68,7 +41,8 @@ function JobForm({ isActive, jobs, setJobs }) {
function handleSubmit(event, stuff) {
event.preventDefault();
- const newJob = { ...stuff };
+ const key = crypto.randomUUID();
+ const newJob = { ...stuff, id: key };
setJobs([...jobs, newJob]);
diff --git a/cv-project/src/components/generalInfoDisplay.jsx b/cv-project/src/components/generalInfoDisplay.jsx
index 5b4621d..4d20b3f 100644
--- a/cv-project/src/components/generalInfoDisplay.jsx
+++ b/cv-project/src/components/generalInfoDisplay.jsx
@@ -2,17 +2,16 @@ export default function GeneralInfoDisplay(props) {
const basicInfo = props.basicInfo;
return (
<>
- {
- basicInfo ?
- (
-
-
{basicInfo.firstName + " " + basicInfo.lastName}
-
{basicInfo.email}
-
{basicInfo.phone}
-
- ) : null
- }
+ {basicInfo ? (
+
+
{basicInfo.fullName}
+
+
{basicInfo.location}
+
{basicInfo.email}
+
{basicInfo.phone}
+
+
+ ) : null}
>
-
- )
+ );
}
diff --git a/cv-project/src/components/generalInfoForm.jsx b/cv-project/src/components/generalInfoForm.jsx
index cfafd7e..ae8a34d 100644
--- a/cv-project/src/components/generalInfoForm.jsx
+++ b/cv-project/src/components/generalInfoForm.jsx
@@ -1,68 +1,83 @@
import { useState } from "react";
+import Input from "./input";
export default function GeneralInfoForm(props) {
- const [firstName, setFirstName] = useState("");
- const [lastName, setLastName] = useState("");
+ const [fullName, setFullName] = useState("");
+ const [location, setLocation] = useState("");
const [phone, setPhone] = useState("");
const [email, setEmail] = useState("");
const contactFormStyle = {
display: "flex",
flexDirection: "column",
- width: "30vw",
- };
-
- const mainStyle = {
- display: "flex",
- justifyContent: "space-between",
};
return (
-
-
+ >
);
}
diff --git a/cv-project/src/components/input.jsx b/cv-project/src/components/input.jsx
new file mode 100644
index 0000000..599bcd2
--- /dev/null
+++ b/cv-project/src/components/input.jsx
@@ -0,0 +1,19 @@
+import "../styles/input.css";
+
+export default function Input(props) {
+ return (
+
+ {props.label ? (
+
+ ) : null}
+
+
+ );
+}
diff --git a/cv-project/src/styles/input.css b/cv-project/src/styles/input.css
new file mode 100644
index 0000000..0a2f55a
--- /dev/null
+++ b/cv-project/src/styles/input.css
@@ -0,0 +1,15 @@
+.input {
+ display: flex;
+ flex-direction: column;
+ font-size: 1.3rem;
+ line-height: 1.3;
+}
+
+.input label {
+ padding: 10px 0 5px 0;
+ font-size: 1rem;
+}
+
+.input input {
+ font-size: 1.3rem;
+}