File tree Expand file tree Collapse file tree
packages/ui/src/features/code-review/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,6 +45,17 @@ const SIDEBAR_MIN_WIDTH = 200;
4545const SIDEBAR_MAX_WIDTH = 500 ;
4646const SIDEBAR_DEFAULT_WIDTH = 280 ;
4747
48+ function getEmptyReviewMessage ( commentFilter : CommentFileFilter ) : string {
49+ switch ( commentFilter ) {
50+ case "commented" :
51+ return "No files with comments" ;
52+ case "unresolved" :
53+ return "No files with unresolved comments" ;
54+ case "none" :
55+ return "No file changes to review" ;
56+ }
57+ }
58+
4859function ExpandedSidebar ( { task } : { task : Task } ) {
4960 const reviewHost = useService < ReviewHost > ( REVIEW_HOST ) ;
5061 const [ width , setWidth ] = useState ( SIDEBAR_DEFAULT_WIDTH ) ;
@@ -371,11 +382,7 @@ export function ReviewShell({
371382 reviewContent = (
372383 < Flex align = "center" justify = "center" className = "min-h-0 flex-1" >
373384 < Text color = "gray" className = "text-sm" >
374- { activeCommentFilter === "commented"
375- ? "No files with comments"
376- : activeCommentFilter === "unresolved"
377- ? "No files with unresolved comments"
378- : "No file changes to review" }
385+ { getEmptyReviewMessage ( activeCommentFilter ) }
379386 </ Text >
380387 </ Flex >
381388 ) ;
You can’t perform that action at this time.
0 commit comments