File tree Expand file tree Collapse file tree 3 files changed +20
-6
lines changed
Expand file tree Collapse file tree 3 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 1+ import { Button } from "@radix-ui/themes" ;
2+ import React from "react" ;
3+
4+ const DeleteIssueButton = ( { issueId } : { issueId : number } ) => {
5+ return < Button color = "red" > Delete Issue</ Button > ;
6+ } ;
7+
8+ export default DeleteIssueButton ;
Original file line number Diff line number Diff line change 11import prisma from "@/prisma/client" ;
2- import { Box , Grid } from "@radix-ui/themes" ;
2+ import { Box , Flex , Grid } from "@radix-ui/themes" ;
33import { notFound } from "next/navigation" ;
44import EditIssueButton from "./EditIssueButton" ;
55import IssueDetails from "./IssueDetails" ;
6+ import DeleteIssueButton from "./DeleteIssueButton" ;
67
78interface Props {
89 params : Promise < {
@@ -21,12 +22,15 @@ const IssueDetailPage = async ({ params }: Props) => {
2122 if ( ! issue ) notFound ( ) ;
2223
2324 return (
24- < Grid columns = { { initial : "1" , sm : "2 " } } gap = "4 " >
25- < Box >
25+ < Grid columns = { { initial : "1" , sm : "5 " } } gap = "5 " >
26+ < Box className = "md:col-span-4" >
2627 < IssueDetails issue = { issue } />
2728 </ Box >
2829 < Box >
29- < EditIssueButton issueId = { issue . id } />
30+ < Flex direction = "column" gap = "4" >
31+ < EditIssueButton issueId = { issue . id } />
32+ < DeleteIssueButton issueId = { issue . id } />
33+ </ Flex >
3034 </ Box >
3135 </ Grid >
3236 ) ;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import type { Metadata } from "next";
44import { Geist , Geist_Mono } from "next/font/google" ;
55import "./globals.css" ;
66import NavBar from "./NavBar" ;
7- import { Theme } from "@radix-ui/themes" ;
7+ import { Container , Theme } from "@radix-ui/themes" ;
88
99const geistSans = Geist ( {
1010 variable : "--font-geist-sans" ,
@@ -33,7 +33,9 @@ export default function RootLayout({
3333 >
3434 < Theme accentColor = "plum" radius = "large" >
3535 < NavBar />
36- < main className = "p-5" > { children } </ main >
36+ < main className = "p-5" >
37+ < Container > { children } </ Container >
38+ </ main >
3739 </ Theme >
3840 </ body >
3941 </ html >
You can’t perform that action at this time.
0 commit comments