-
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.
feat:task details and task edit page created
- Loading branch information
Showing
4 changed files
with
36 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import ButtonsExport from "@/components/shared/detay/buttons-export" | ||
import { buttonVariants } from "@/components/ui/button" | ||
import Link from "next/link" | ||
|
||
|
||
export default async function TaskEdit({ | ||
params, | ||
}: { | ||
params: Promise<{ id: string }> | ||
}) { | ||
const id = (await params).id | ||
const response = await fetch(`https://crm-backend-production-e80f.up.railway.app/api/tasks/${id}`, { cache: 'no-store' }) | ||
const data = await response.json() | ||
console.log(data) | ||
return (<div className="flex flex-col justify-between items-center gap-2"> | ||
<div className="flex w-full justify-between gap-2"> | ||
<Link href={"/bussines/task"} className={buttonVariants({})}>Back</Link> | ||
<ButtonsExport type="bussines" id={id} /> | ||
</div> | ||
<div className="w-full"> | ||
Task Details | ||
{ | ||
data.map((item: any) => item.title) | ||
} | ||
{id} | ||
</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
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