@@ -12,9 +12,9 @@ import { ElementPanel } from '../ElementPanel';
12
12
function getTime ( ) {
13
13
const date = new Date ( ) ;
14
14
let hours = String ( date . getHours ( ) ) ;
15
- hours = + hours >= 10 ? hours : `0${ hours } ` ;
15
+ hours = Number ( hours ) >= 10 ? hours : `0${ hours } ` ;
16
16
let mins = String ( date . getMinutes ( ) ) ;
17
- mins = + mins >= 10 ? mins : `0${ mins } ` ;
17
+ mins = Number ( mins ) >= 10 ? mins : `0${ mins } ` ;
18
18
return [ hours , mins ] . join ( ':' ) ;
19
19
}
20
20
@@ -66,7 +66,9 @@ export const PCFrame = ({
66
66
function move ( e : MouseEvent ) {
67
67
e . preventDefault ( ) ;
68
68
const { clientX } = e ;
69
- const diffX = + ( rightWidth - ( clientX - xAxisRef . current ) ) . toFixed ( 2 ) ;
69
+ const diffX = Number (
70
+ ( rightWidth - ( clientX - xAxisRef . current ) ) . toFixed ( 2 ) ,
71
+ ) ;
70
72
if ( diffX > MAX_SIZE || diffX < MIN_SIZE ) return ;
71
73
setWidth ( diffX ) ;
72
74
}
@@ -90,9 +92,9 @@ export const PCFrame = ({
90
92
< div className = "pc-frame__top" >
91
93
< div className = "pc-frame__top-left" >
92
94
< Space >
93
- < div className = "function-circle close" > </ div >
94
- < div className = "function-circle mini" > </ div >
95
- < div className = "function-circle fullscreen" > </ div >
95
+ < div className = "function-circle close" / >
96
+ < div className = "function-circle mini" / >
97
+ < div className = "function-circle fullscreen" / >
96
98
</ Space >
97
99
</ div >
98
100
< div className = "pc-frame__top-right" >
@@ -144,16 +146,16 @@ const IOSFrame = ({ children }: PropsWithChildren<unknown>) => {
144
146
< div className = "ios-frame__top" >
145
147
< p className = "ios-frame__top-left" > { time } </ p >
146
148
< p className = "ios-frame__top-hair" >
147
- < p className = "ios-frame__top-forehead" > </ p >
149
+ < p className = "ios-frame__top-forehead" / >
148
150
</ p >
149
151
< p className = "ios-frame__top-right" >
150
- < Icon component = { CellularSVG } > </ Icon >
151
- < Icon component = { BatterySVG } className = "ios-battery" > </ Icon >
152
+ < Icon component = { CellularSVG } / >
153
+ < Icon component = { BatterySVG } className = "ios-battery" / >
152
154
</ p >
153
155
</ div >
154
156
< div className = "ios-frame__content" > { children } </ div >
155
157
< div className = "ios-frame__bottom" >
156
- < div className = "ios-home" > </ div >
158
+ < div className = "ios-home" / >
157
159
</ div >
158
160
</ div >
159
161
) ;
@@ -163,17 +165,17 @@ const AndroidFrame = ({ children }: PropsWithChildren<unknown>) => {
163
165
const time = getTime ( ) ;
164
166
return (
165
167
< div className = "android-frame" >
166
- < div className = "android-frame__camera" > </ div >
168
+ < div className = "android-frame__camera" / >
167
169
< div className = "android-frame__top" >
168
170
< p className = "android-frame__top-left" > { time } </ p >
169
171
< p className = "android-frame__top-right" >
170
- < Icon component = { CellularSVG } > </ Icon >
171
- < Icon component = { BatterySVG } className = "android-battery" > </ Icon >
172
+ < Icon component = { CellularSVG } / >
173
+ < Icon component = { BatterySVG } className = "android-battery" / >
172
174
</ p >
173
175
</ div >
174
176
< div className = "android-frame__content" > { children } </ div >
175
177
< div className = "android-frame__bottom" >
176
- < div className = "android-home" > </ div >
178
+ < div className = "android-home" / >
177
179
</ div >
178
180
</ div >
179
181
) ;
0 commit comments