1- import React , { useState , useMemo } from " react" ;
2- import { Locale , Segmented } from " @svar-ui/react-core" ;
3- import { Comments } from " ../../src/index" ;
4- import { getData } from " ../data" ;
1+ import React , { useState , useMemo } from ' react' ;
2+ import { Locale , Segmented } from ' @svar-ui/react-core' ;
3+ import { Comments } from ' ../../src/index' ;
4+ import { getData } from ' ../data' ;
55
6- import { de , cn } from " @svar-ui/comments-locales" ;
7- import { de as deCore , cn as cnCore } from " @svar-ui/core-locales" ;
6+ import { de , cn } from ' @svar-ui/comments-locales' ;
7+ import { de as deCore , cn as cnCore } from ' @svar-ui/core-locales' ;
88
9- import " ./Locale.css" ;
9+ import ' ./Locale.css' ;
1010
1111export default function Component ( ) {
1212 const { data, users } = useMemo ( ( ) => getData ( ) , [ ] ) ;
1313
1414 const options = [
15- { label : " Bubbles" , id : " bubbles" } ,
16- { label : " Flow" , id : " flow" } ,
15+ { label : ' Bubbles' , id : ' bubbles' } ,
16+ { label : ' Flow' , id : ' flow' } ,
1717 ] ;
1818
1919 const langs = [
20- { id : "en" , label : "EN" } ,
21- { id : "de" , label : "DE" } ,
22- { id : "cn" , label : "CN" } ,
20+ { id : 'en' , label : 'EN' } ,
21+ { id : 'de' , label : 'DE' } ,
22+ { id : 'cn' , label : 'CN' } ,
2323 ] ;
2424
25- const [ render , setRender ] = useState ( " flow" ) ;
26- const [ lang , setLang ] = useState ( "en" ) ;
25+ const [ render , setRender ] = useState ( ' flow' ) ;
26+ const [ lang , setLang ] = useState ( 'en' ) ;
2727
2828 return (
2929 < >
@@ -39,9 +39,9 @@ export default function Component() {
3939 onChange = { ( { value } ) => setRender ( value ) }
4040 />
4141 </ div >
42- < div style = { { margin : " auto" , maxWidth : " 700px" , marginTop : " 40px" } } >
42+ < div style = { { margin : ' auto' , maxWidth : ' 700px' , marginTop : ' 40px' } } >
4343 < React . Fragment key = { render } >
44- { lang === "de" ? (
44+ { lang === 'de' ? (
4545 < Locale words = { { ...de , deCore } } >
4646 < Comments
4747 focus = { true }
@@ -51,7 +51,7 @@ export default function Component() {
5151 render = { render }
5252 />
5353 </ Locale >
54- ) : lang === "cn" ? (
54+ ) : lang === 'cn' ? (
5555 < Locale words = { { ...cn , cnCore } } >
5656 < Comments
5757 focus = { true }
@@ -74,4 +74,4 @@ export default function Component() {
7474 </ div >
7575 </ >
7676 ) ;
77- }
77+ }
0 commit comments