File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 1
- import React from 'react' ;
1
+ import React , { memo } from 'react' ;
2
2
3
3
import Mark from './Mark' ;
4
4
@@ -10,11 +10,13 @@ type HourMarkProps = React.ComponentProps<typeof Mark> & {
10
10
number ?: number ;
11
11
} ;
12
12
13
- export default function HourMark ( {
13
+ const HourMark = memo ( function HourMark ( {
14
14
formatHour = defaultFormatHour ,
15
15
locale,
16
16
number,
17
17
...otherProps
18
18
} : HourMarkProps ) {
19
19
return < Mark number = { number ? formatHour ( locale , number ) : null } { ...otherProps } /> ;
20
- }
20
+ } ) ;
21
+
22
+ export default HourMark ;
Original file line number Diff line number Diff line change 1
- import React from 'react' ;
1
+ import React , { memo } from 'react' ;
2
2
3
3
import Mark from './Mark' ;
4
4
5
5
type MinuteMarkProps = React . ComponentProps < typeof Mark > ;
6
6
7
- export default function MinuteMark ( props : MinuteMarkProps ) {
7
+ const MinuteMark = memo ( function MinuteMark ( props : MinuteMarkProps ) {
8
8
return < Mark { ...props } /> ;
9
- }
9
+ } ) ;
10
+
11
+ export default MinuteMark ;
You can’t perform that action at this time.
0 commit comments