f562b0e4c03722158fe05db2c6575e24.json
7.47 KB
{"ast":null,"code":"var _interopRequireWildcard=require(\"@babel/runtime/helpers/interopRequireWildcard\");var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");Object.defineProperty(exports,\"__esModule\",{value:true});exports.default=void 0;var _regenerator=_interopRequireDefault(require(\"@babel/runtime/regenerator\"));var _react=_interopRequireWildcard(require(\"react\"));var _Surface=_interopRequireDefault(require(\"react-native-paper/lib/module/components/Surface\"));var _Text=_interopRequireDefault(require(\"react-native-paper/lib/module/components/Typography/Text\"));var _Divider=_interopRequireDefault(require(\"react-native-paper/lib/module/components/Divider\"));var _View=_interopRequireDefault(require(\"react-native-web/dist/exports/View\"));var _StyleSheet=_interopRequireDefault(require(\"react-native-web/dist/exports/StyleSheet\"));var _reactRedux=require(\"react-redux\");var _search=require(\"../../reducers/search\");var _PromptSearchRate=_interopRequireDefault(require(\"../PromptSearch/PromptSearchRate\"));var RateLine=function RateLine(_ref){var load=_ref.load,pastScore=_ref.pastScore;(0,_react.useEffect)(function(){var get=function get(){return _regenerator.default.async(function get$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.next=2;return _regenerator.default.awrap(load());case 2:case\"end\":return _context.stop();}}});};get();},[load]);return _react.default.createElement(_Surface.default,{style:styles.surface},pastScore.length?_react.default.createElement(_react.default.Fragment,null,_react.default.createElement(_Text.default,{style:styles.info},\"\\uCD5C\\uADFC \\uC810\\uC218\"),_react.default.createElement(_View.default,{style:styles.scoreContainer},pastScore.map(function(elem,index){return _react.default.createElement(_Text.default,{key:index,style:styles.score},elem);})),_react.default.createElement(_View.default,{style:styles.detail},_react.default.createElement(_Text.default,{style:styles.new},\"\\uCD5C\\uADFC\"),_react.default.createElement(_Text.default,null)),_react.default.createElement(_Text.default,null,\"\\uB2F9\\uC2E0\\uC758 \\uCD5C\\uADFC \\uC810\\uC218 \\uD2B8\\uB80C\\uB4DC\\uC785\\uB2C8\\uB2E4\")):_react.default.createElement(_PromptSearchRate.default,null));};var styles=_StyleSheet.default.create({surface:{padding:8,flex:0.4,width:'95%',alignItems:'center',justifyContent:'center',elevation:2,marginTop:10,marginBottom:10},info:{fontSize:25,fontWeight:'bold',marginBottom:15},score:{fontSize:20},scoreContainer:{flexDirection:'row',justifyContent:'space-around',width:'100%'},detail:{width:'100%',justifyContent:'space-around'},new:{fontSize:18,marginLeft:20,color:'#995432'}});var RateLineContainer=function RateLineContainer(_ref2){var load=_ref2.load,pastScore=_ref2.pastScore;return _react.default.createElement(RateLine,{load:load,pastScore:pastScore});};var _default=(0,_reactRedux.connect)(function(_ref3){var search=_ref3.search;return{pastScore:search.pastScore};},{load:_search.load})(RateLineContainer);exports.default=_default;","map":{"version":3,"sources":["C:/Users/bluej/Desktop/2_2/searchGuide/searchGuide/components/RateLine/RateLine.js"],"names":["RateLine","load","pastScore","get","styles","surface","length","info","scoreContainer","map","elem","index","score","detail","new","StyleSheet","create","padding","flex","width","alignItems","justifyContent","elevation","marginTop","marginBottom","fontSize","fontWeight","flexDirection","marginLeft","color","RateLineContainer","search"],"mappings":"uUAAA,qD,odAGA,uCACA,6CACA,0FAGA,GAAMA,CAAAA,QAAQ,CAAG,QAAXA,CAAAA,QAAW,MAAuB,IAArBC,CAAAA,IAAqB,MAArBA,IAAqB,CAAhBC,SAAgB,MAAhBA,SAAgB,CACpC,qBAAU,UAAI,CACV,GAAMC,CAAAA,GAAG,CAAG,QAANA,CAAAA,GAAM,mKACFF,IAAI,EADF,gDAAZ,CAGAE,GAAG,GACN,CALD,CAKG,CAACF,IAAD,CALH,EAOA,MACI,8BAAC,gBAAD,EAAS,KAAK,CAAEG,MAAM,CAACC,OAAvB,EACKH,SAAS,CAACI,MAAV,CACD,0DACI,6BAAC,aAAD,EAAM,KAAK,CAAEF,MAAM,CAACG,IAApB,8BADJ,CAEI,6BAAC,aAAD,EAAM,KAAK,CAAEH,MAAM,CAACI,cAApB,EACCN,SAAS,CAACO,GAAV,CAAc,SAACC,IAAD,CAAMC,KAAN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QAAD,EAAU,IAAI,CAAED,IAAhB,CAAsB,SAAS,CAAEC,SAAjC,EADsB,EAA1B,C,aAIe,wBACX,mBAAE6B,CAAAA,MAAF,OAAEA,MAAF,OAAa,CACT7B,SAAS,CAAC6B,MAAM,CAAC7B,SADR,CAAb,EADW,CAIX,CACID,IAAI,CAAJA,YADJ,CAJW,EAOb6B,iBAPa,C","sourcesContent":["import React, {useEffect} from 'react';\r\nimport { Surface, Text,Divider} from 'react-native-paper';\r\nimport { View,StyleSheet } from 'react-native';\r\nimport {connect} from 'react-redux';\r\nimport {load } from '../../reducers/search';\r\nimport PromptSearchRate from '../PromptSearch/PromptSearchRate';\r\n\r\n\r\nconst RateLine = ({load,pastScore }) => {\r\n useEffect(()=>{\r\n const get = async () => {\r\n await load();\r\n }\r\n get();\r\n }, [load]);\r\n\r\n return (\r\n <Surface style={styles.surface}>\r\n {pastScore.length ? \r\n <>\r\n <Text style={styles.info}>최근 점수</Text>\r\n <View style={styles.scoreContainer}>\r\n {pastScore.map((elem,index)=> (\r\n <Text key={index} style={styles.score}>{elem}</Text>\r\n ))} \r\n </View>\r\n <View style={styles.detail}><Text style={styles.new}>최근</Text><Text></Text></View>\r\n <Text>당신의 최근 점수 트렌드입니다</Text>\r\n </>\r\n : <PromptSearchRate />\r\n }\r\n </Surface>\r\n );\r\n}\r\n\r\n\r\n\r\nconst styles = StyleSheet.create({\r\n surface: {\r\n padding: 8,\r\n flex: 0.4,\r\n width: '95%',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n elevation: 2,\r\n marginTop: 10,\r\n marginBottom: 10,\r\n },\r\n info:{\r\n fontSize:25,\r\n fontWeight:'bold',\r\n marginBottom: 15\r\n },\r\n score:{\r\n fontSize:20\r\n },\r\n scoreContainer:{\r\n flexDirection:'row',\r\n justifyContent: 'space-around',\r\n width:'100%'\r\n },\r\n detail:{\r\n width:'100%',\r\n justifyContent:'space-around',\r\n \r\n },\r\n new:{\r\n fontSize: 18,\r\n marginLeft: 20,\r\n color:'#995432'\r\n }\r\n});\r\n\r\nconst RateLineContainer = ( {load,pastScore } ) => (\r\n <RateLine load={load} pastScore={pastScore} />\r\n);\r\n\r\nexport default connect(\r\n ({search})=>({\r\n pastScore:search.pastScore\r\n }),\r\n {\r\n load\r\n }\r\n)(RateLineContainer);"]},"metadata":{},"sourceType":"script"}