Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: tinder and taslist pages swapped
- Loading branch information
1 parent
2388a35
commit 937ef16
Showing
6 changed files
with
83 additions
and
85 deletions.
There are no files selected for viewing
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,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} />; | ||
})} | ||
</> | ||
); | ||
} |
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,29 @@ | ||
.addTaskIcon:before { | ||
content: ""; | ||
position: absolute; | ||
top: 25%; | ||
left: 25%; | ||
width: 50%; | ||
height: 50%; | ||
border-radius: 50%; | ||
background: var(--color_white); | ||
} | ||
|
||
.addTaskIcon { | ||
position: absolute; | ||
color: var(--color_purple); | ||
width: 4.5rem; | ||
height: 4.5rem; | ||
transform: translate(-50%, -50%); | ||
border-radius: 50%; | ||
cursor: pointer; | ||
z-index: 1; | ||
} | ||
|
||
.icon__add { | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
color: var(--color_purple); | ||
z-index: 5; | ||
} |
This file was deleted.
Oops, something went wrong.
Empty file.