-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # frontend/src/app/globals.css # frontend/src/app/page.js
- Loading branch information
Showing
13 changed files
with
242 additions
and
92 deletions.
There are no files selected for viewing
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,7 @@ | ||
export default function Input(props) { | ||
return ( | ||
<> | ||
<input {...props} /> | ||
</> | ||
); | ||
} |
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 |
---|---|---|
@@ -1,34 +1,47 @@ | ||
import styles from "./Header.module.css"; | ||
import SettingsIcon from '@mui/icons-material/Settings'; | ||
import SettingsIcon from "@mui/icons-material/Settings"; | ||
import Image from "next/image"; | ||
import Popover from "@/app/components/Popover/Popover"; | ||
import Settings from "@/app/components/Settings/Settings"; | ||
|
||
export default function Header({ title }) { | ||
const pbDimenstions = 30 | ||
const pbDimenstions = 30; | ||
|
||
return ( | ||
<> | ||
<header className={styles.header}> | ||
<Popover trigger={ | ||
<div | ||
className={styles.profile} | ||
> | ||
<Image | ||
className={styles.profile__img} | ||
src="/images/sloth-profile.svg" | ||
width={pbDimenstions} | ||
height={pbDimenstions} | ||
alt="Profile Pic" | ||
<Popover | ||
trigger={ | ||
<div className={styles.profile}> | ||
<Image | ||
className={styles.profile__img} | ||
src="/images/sloth-profile.svg" | ||
width={pbDimenstions} | ||
height={pbDimenstions} | ||
alt="Profile Pic" | ||
/> | ||
<SettingsIcon className="fcolor--purple" /> | ||
</div> | ||
}> | ||
<SettingsIcon className="fcolor--purple" /> | ||
</div> | ||
} | ||
> | ||
<Settings /> | ||
</Popover> | ||
|
||
<h1 className={styles.title}>{title}</h1> | ||
|
||
{title.length > 0 ? ( | ||
<h1 className={styles.title}>{title}</h1> | ||
) : ( | ||
<Image | ||
className={styles.logo} | ||
width={130} | ||
height={100} | ||
src="/images/kickass-logo.svg" | ||
style={{ | ||
height: "auto", | ||
}} | ||
alt="Logo" | ||
/> | ||
)} | ||
</header> | ||
</> | ||
); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import { useState } from "react"; | ||
import Input from "../Forms/Input"; | ||
|
||
export default function AddTask() { | ||
|
||
const [taskName, setTaskName] = useState(""); | ||
const [importance, setImportance] = useState(0); | ||
const [urgency, setUrgency] = useState(0); | ||
const [repeat, setRepeat] = useState(0); | ||
|
||
const importanceOptions = [ | ||
{ | ||
weight: 1, | ||
name: "Nice to have" | ||
}, | ||
{ | ||
weight: 2, | ||
name: "Quite important" | ||
}, | ||
{ | ||
weight: 3, | ||
name: "F*cking important" | ||
} | ||
]; | ||
|
||
const urgencyOptions = [ | ||
{ | ||
weight: 1, | ||
name: "Maybe one day" | ||
}, | ||
{ | ||
weight: 2, | ||
name: "To be done ASAP" | ||
}, | ||
{ | ||
weight: 3, | ||
name: "Right now!" | ||
} | ||
]; | ||
|
||
const repeatOptions = [ | ||
{ | ||
weight: 1, | ||
name: "Daily" | ||
}, | ||
{ | ||
weight: 2, | ||
name: "Weekly" | ||
}, | ||
{ | ||
weight: 3, | ||
name: "Monthly" | ||
} | ||
]; | ||
|
||
const addTask = async (e) => { | ||
e.preventDefault(); | ||
|
||
}; | ||
|
||
return ( | ||
<> | ||
<h2>Add Task</h2> | ||
<form onSubmit={addTask}></form> | ||
<Input | ||
onChange={e => setTaskName(e.target.value)} | ||
type="text" | ||
value={taskName} | ||
name="taskName" | ||
style={{width: "100%"}} | ||
/> | ||
|
||
|
||
|
||
|
||
</> | ||
); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,17 @@ | ||
"use client"; | ||
|
||
import {useState} from "react"; | ||
import TaskRow from "./components/TaskRow/TaskRow"; | ||
import { useState, useEffect } from "react"; | ||
import styles from "./page.module.css"; | ||
import TinderSwiper from "@/app/components/TinderSwiper/TinderSwiper"; | ||
|
||
import defaultTasks from "./testdata/tasks.js"; | ||
import Popover from "@/app/components/Popover/Popover"; | ||
import AddCircleIcon from '@mui/icons-material/AddCircle'; | ||
import TaskCreate from "@/app/components/TaskCreate/TaskCreate"; | ||
|
||
export default function Home() { | ||
const [tasks, setTasks] = useState(defaultTasks); | ||
|
||
/* | ||
const fetchTaskList = async () => { | ||
try { | ||
const response = await fetch(`http://localhost:5000/getTasks`); | ||
if (!response.ok) { | ||
throw new Error("Network response was not ok"); | ||
} | ||
const data = await response.json(); | ||
console.log(data); | ||
setTasks(data); | ||
} catch (error) { | ||
console.error("Error fetching user data:", error); | ||
} | ||
}; | ||
useEffect(() => { | ||
fetchTaskList(); | ||
}, []); | ||
*/ | ||
|
||
return ( | ||
<> | ||
<Popover trigger={ | ||
<div> | ||
<AddCircleIcon className="fcolor--purple" /> | ||
</div> | ||
}> | ||
<TaskCreate /> | ||
</Popover> | ||
|
||
{tasks.map(({ name, id }) => { | ||
return <TaskRow key={id} taskName={name} />; | ||
})} | ||
<TinderSwiper tasks={tasks} /> | ||
</> | ||
); | ||
} |
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 @@ | ||
"use client"; | ||
|
||
import Image from "next/image"; | ||
import styles from "./page.module.css"; | ||
import TaskRow from "@/app/components/TaskRow/TaskRow"; | ||
import Popover from "@/app/components/Popover/Popover"; | ||
import AddTask from "@/app/components/Tasks/AddTask"; | ||
import AddCircleRoundedIcon from "@mui/icons-material/AddCircleRounded"; | ||
import defaultTask from "@/app/testdata/tasks"; | ||
import React, { useState, useEffect } from "react"; | ||
|
||
export default function Tinder() { | ||
const [tasks, setTasks] = useState(defaultTask); | ||
|
||
/* | ||
const fetchTaskList = async () => { | ||
try { | ||
const response = await fetch(`http://localhost:5000/getTasks`); | ||
if (!response.ok) { | ||
throw new Error("Network response was not ok"); | ||
} | ||
const data = await response.json(); | ||
console.log(data); | ||
setTasks(data); | ||
} catch (error) { | ||
console.error("Error fetching user data:", error); | ||
} | ||
}; | ||
useEffect(() => { | ||
fetchTaskList(); | ||
}, []); | ||
*/ | ||
|
||
return ( | ||
<> | ||
<Popover | ||
trigger={ | ||
<div className={styles.addTaskIcon}> | ||
<AddCircleRoundedIcon className={styles.icon__add} /> | ||
</div> | ||
} | ||
> | ||
<AddTask /> | ||
</Popover> | ||
{tasks.map(({ name, id }) => { | ||
return <TaskRow key={id} taskName={name} />; | ||
})} | ||
</> | ||
); | ||
} |
Oops, something went wrong.