File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change 8
8
LinkBox ,
9
9
LinkOverlay ,
10
10
Text ,
11
- useColorMode ,
11
+ useColorModeValue ,
12
12
} from "@chakra-ui/react"
13
13
14
14
// Components
@@ -50,7 +50,11 @@ export interface IProps {}
50
50
const MeetupList : React . FC < IProps > = ( ) => {
51
51
const [ searchField , setSearchField ] = useState < string > ( "" )
52
52
const filteredMeetups = filterMeetups ( searchField )
53
- const { colorMode } = useColorMode ( )
53
+ const listBoxShadow = useColorModeValue ( "tableBox.light" , "tableBox.dark" )
54
+ const listItemBoxShadow = useColorModeValue (
55
+ "tableItemBox.light" ,
56
+ "tableItemBox.dark"
57
+ )
54
58
55
59
const handleSearch = ( event : React . ChangeEvent < HTMLInputElement > ) : void =>
56
60
setSearchField ( event . target . value )
@@ -74,20 +78,14 @@ const MeetupList: React.FC<IProps> = () => {
74
78
_focus = { { outline : "auto 1px" } }
75
79
_placeholder = { { color : "text200" } }
76
80
/>
77
- < Box
78
- boxShadow = { colorMode === "dark" ? "tableBox.dark" : "tableBox.light" }
79
- >
81
+ < Box boxShadow = { listBoxShadow } >
80
82
{ filteredMeetups . length ? (
81
83
filteredMeetups . map ( ( meetup , idx ) => (
82
84
< LinkBox
83
85
key = { idx }
84
86
display = "flex"
85
87
justifyContent = "space-between"
86
- boxShadow = {
87
- colorMode === "dark"
88
- ? "tableItemBox.dark"
89
- : "tableItemBox.light"
90
- }
88
+ boxShadow = { listItemBoxShadow }
91
89
mb = { 0.25 }
92
90
p = { 4 }
93
91
w = "100%"
You can’t perform that action at this time.
0 commit comments