1- import {
2- getScanReport ,
3- getScanReportPermissions ,
4- } from "@/api/scanreports" ;
1+ import { getScanReport , getScanReportPermissions } from "@/api/scanreports" ;
52import { Forbidden } from "@/components/core/Forbidden" ;
63import { NavGroup } from "@/components/core/nav-group" ;
74import DeleteDialog from "@/components/scanreports/DeleteDialog" ;
@@ -14,7 +11,7 @@ import {
1411 DropdownMenuContent ,
1512 DropdownMenuTrigger ,
1613 DropdownMenuSeparator ,
17- DropdownMenuLabel
14+ DropdownMenuLabel ,
1815} from "@/components/ui/dropdown-menu" ;
1916import { Suspense } from "react" ;
2017import { Skeleton } from "@/components/ui/skeleton" ;
@@ -28,7 +25,11 @@ import { UploadStatusOptions } from "@/constants/scanReportStatus";
2825import ExportScanReport from "@/components/scanreports/ExportScanReport" ;
2926import { ActionsDownloadMenu } from "./actions-download-menu" ;
3027
31- export async function generateMetadata ( { params } : { params : Promise < { id : string } > } ) {
28+ export async function generateMetadata ( {
29+ params,
30+ } : {
31+ params : Promise < { id : string } > ;
32+ } ) {
3233 const resolvedParams = await params ;
3334 const scanreport = await getScanReport ( resolvedParams . id ) ;
3435 return {
@@ -39,7 +40,7 @@ export async function generateMetadata({ params }: { params: Promise<{ id: strin
3940
4041export default async function ScanReportLayout (
4142 props : Readonly < {
42- params : { id : string } ;
43+ params : Promise < { id : string } > ;
4344 children : React . ReactNode ;
4445 } >
4546) {
@@ -57,11 +58,11 @@ export default async function ScanReportLayout(
5758 {
5859 name : "Tables" ,
5960 iconName : "TableProperties" ,
60- matchPrefixes : [ "tables" ]
61+ matchPrefixes : [ "tables" ] ,
6162 } ,
6263 { name : "Rules" , slug : "mapping_rules" , iconName : "Waypoints" } ,
6364 { name : "Review Rules" , slug : "review_rules" , iconName : "SearchCheck" } ,
64- { name : "Downloads" , slug : "downloads" , iconName : "Download" }
65+ { name : "Downloads" , slug : "downloads" , iconName : "Download" } ,
6566 ] ;
6667
6768 {
@@ -71,7 +72,7 @@ export default async function ScanReportLayout(
7172 items . push ( {
7273 name : "Edit Details" ,
7374 slug : "details" ,
74- iconName : "Edit"
75+ iconName : "Edit" ,
7576 } ) ;
7677 }
7778
@@ -144,25 +145,28 @@ export default async function ScanReportLayout(
144145 }
145146 />
146147 </ div >
147-
148148 </ div >
149149 < div className = "hidden md:flex flex-col md:flex-row md:items-center h-7 text-sm space-y-2 md:space-y-0 divide-y md:divide-y-0 md:divide-x" >
150150 < div className = "flex items-center gap-2 text-muted-foreground" >
151- Members:{ " " }
152- < AvatarList
153- members = { [ scanreport . author , ...scanreport . viewers , ...scanreport . editors ] . filter (
154- ( member , index , self ) =>
155- index === self . findIndex ( ( m ) => m . id === member . id )
156- ) }
157- />
151+ Members:{ " " }
152+ < AvatarList
153+ members = { [
154+ scanreport . author ,
155+ ...scanreport . viewers ,
156+ ...scanreport . editors ,
157+ ] . filter (
158+ ( member , index , self ) =>
159+ index === self . findIndex ( ( m ) => m . id === member . id )
160+ ) }
161+ />
158162 </ div >
159163 </ div >
160164 { /* "Navs" group */ }
161165 < div className = "flex flex-col md:flex-row justify-between mt-6 md:mt-0" >
162166 < div >
163167 < NavGroup
164- path = { `/scanreports/${ params . id } ` }
165- items = { items . map ( x => ( { ...x , text : x . name } ) ) }
168+ path = { `/scanreports/${ params . id } ` }
169+ items = { items . map ( ( x ) => ( { ...x , text : x . name } ) ) }
166170 />
167171 </ div >
168172
0 commit comments