File tree Expand file tree Collapse file tree 1 file changed +6
-18
lines changed
invokeai/frontend/web/src/features/gallery/components Expand file tree Collapse file tree 1 file changed +6
-18
lines changed Original file line number Diff line number Diff line change 1
- import { Flex } from '@invoke-ai/ui-library' ;
1
+ import { Flex , Text } from '@invoke-ai/ui-library' ;
2
2
import { useAppSelector } from 'app/store/storeHooks' ;
3
- import { memo , useMemo } from 'react' ;
3
+ import { memo } from 'react' ;
4
4
import { useBoardName } from 'services/api/hooks/useBoardName' ;
5
5
6
6
const GalleryBoardName = ( ) => {
7
7
const selectedBoardId = useAppSelector ( ( s ) => s . gallery . selectedBoardId ) ;
8
8
const boardName = useBoardName ( selectedBoardId ) ;
9
9
10
- const formattedBoardName = useMemo ( ( ) => {
11
- if ( boardName . length > 20 ) {
12
- return `${ boardName . substring ( 0 , 20 ) } ...` ;
13
- }
14
- return boardName ;
15
- } , [ boardName ] ) ;
16
-
17
10
return (
18
- < Flex
19
- justifyContent = "center"
20
- fontSize = "md"
21
- fontWeight = "bold"
22
- borderWidth = "thin"
23
- borderStyle = "solid"
24
- borderRadius = "base"
25
- >
26
- { formattedBoardName }
11
+ < Flex w = "full" borderWidth = { 1 } borderRadius = "base" alignItems = "center" justifyContent = "center" px = { 2 } >
12
+ < Text fontWeight = "semibold" fontSize = "md" noOfLines = { 1 } wordBreak = "break-all" color = "base.200" >
13
+ { boardName }
14
+ </ Text >
27
15
</ Flex >
28
16
) ;
29
17
} ;
You can’t perform that action at this time.
0 commit comments