@@ -12,17 +12,13 @@ import {
1212 BranchName ,
1313 Heading ,
1414 Label ,
15- LabelColorOptions ,
16- StateLabel ,
1715 RelativeTime ,
1816} from "@primer/react" ;
1917import { usePathname , useRouter } from "next/navigation" ;
2018import { useCallback , useEffect , MouseEvent , useState } from "react" ;
21- import { ErrorMessages } from "@/utils/errors" ;
2219import { useAppStore } from "@/store/provider" ;
2320import { EntitiesProject , EntitiesProjectEndpoint } from "@/api/model" ;
2421import {
25- CopyIcon ,
2622 GearIcon ,
2723 LinkIcon ,
2824 PencilIcon ,
@@ -66,7 +62,7 @@ export default function ProjectShow() {
6662
6763 useEffect ( ( ) => {
6864 loadProject ( ) ;
69- } , [ projectId ] ) ;
65+ } ) ;
7066
7167 const loadProjectEndpoints = ( ) => {
7268 setLoadingEndpoints ( true ) ;
@@ -81,7 +77,7 @@ export default function ProjectShow() {
8177
8278 useEffect ( ( ) => {
8379 loadProjectEndpoints ( ) ;
84- } , [ projectId ] ) ;
80+ } ) ;
8581
8682 const onDeleteProject = async ( event : MouseEvent ) => {
8783 event . preventDefault ( ) ;
@@ -129,7 +125,7 @@ export default function ProjectShow() {
129125 minHeight : "calc(100vh - 200px)" ,
130126 } }
131127 >
132- < PageHeader role = "banner" aria-label = "project details" >
128+ < PageHeader role = "banner" aria-label = "Project details" >
133129 < PageHeader . TitleArea variant = { "large" } >
134130 { project && (
135131 < PageHeader . Title > { project && project . name } </ PageHeader . Title >
@@ -165,7 +161,7 @@ export default function ProjectShow() {
165161 < ActionMenu . Overlay >
166162 < ActionList >
167163 < ActionList . Item
168- onClick = { ( ) => router . push ( `/projects/${ projectId } /edit` ) }
164+ onSelect = { ( ) => router . push ( `/projects/${ projectId } /edit` ) }
169165 >
170166 Edit Project
171167 < ActionList . LeadingVisual >
@@ -216,13 +212,13 @@ export default function ProjectShow() {
216212 } ,
217213 ] }
218214 >
219- < Box >
220- < Text >
215+ < div >
216+ < p >
221217 Are you sure you want to delete the{ " " }
222218 < BranchName > { project ?. name } </ BranchName > project. This is a
223219 permanent action and it cannot be reversed.
224- </ Text >
225- </ Box >
220+ </ p >
221+ </ div >
226222 < Box sx = { { mt : 2 } } >
227223 < Text sx = { { color : "fg.muted" } } >
228224 { project ?. subdomain } .httpmock.dev
@@ -231,16 +227,16 @@ export default function ProjectShow() {
231227 </ Dialog >
232228 ) }
233229
234- < Box >
230+ < div >
235231 < Heading as = "h2" sx = { { mt : 32 } } variant = "medium" >
236232 < LinkIcon size = { 24 } />
237233 < Text sx = { { ml : 2 } } > Endpoints</ Text >
238234 </ Heading >
239- </ Box >
235+ </ div >
240236 { loadingEndpoints && (
241- < Box >
237+ < div >
242238 < Spinner size = "large" />
243- </ Box >
239+ </ div >
244240 ) }
245241 { ! loadingEndpoints && (
246242 < Box
@@ -268,7 +264,7 @@ export default function ProjectShow() {
268264 } }
269265 >
270266 { endpoints . map ( ( endpoint ) => (
271- < Box key = { endpoint . id } >
267+ < div key = { endpoint . id } >
272268 < Box sx = { { display : "flex" , alignItems : "baseline" } } >
273269 < Label sx = { { color : getLabelColor ( endpoint . request_method ) } } >
274270 { endpoint . request_method }
@@ -304,7 +300,7 @@ export default function ProjectShow() {
304300 >
305301 Manage
306302 </ Button >
307- < Box >
303+ < div >
308304 < Text size = "small" sx = { { mr : 1 , color : "fg.muted" } } >
309305 Updated
310306 </ Text >
@@ -313,9 +309,9 @@ export default function ProjectShow() {
313309 date = { new Date ( endpoint . updated_at ) }
314310 noTitle = { true }
315311 > </ RelativeTime >
316- </ Box >
312+ </ div >
317313 </ Box >
318- </ Box >
314+ </ div >
319315 ) ) }
320316 </ Box >
321317 ) }
0 commit comments