{
"data": {
"socializer.near": {
"widget": {
"TxHistory": {
"": "const Owner = \"socializer.near\";\nconst API_URL = props?.API_URL || \"http://localhost:3000\";\nlet list = props?.data || [];\nconst getTokenData = props?.getTokenData || ((param) => {});\n\nconst columns = [\n {\n title: \"S.No\",\n key: \"no\",\n width: 20,\n align: \"left\",\n },\n {\n title: \"Amount\",\n key: \"amount\",\n width: 20,\n align: \"left\",\n },\n {\n title: \"Transaction\",\n key: \"hash\",\n width: 20,\n align: \"left\",\n icon: <img src={`${API_URL}/trx.svg`} />,\n link: true,\n click: () => {},\n },\n {\n title: \"Transaction Type\",\n key: \"type\",\n width: 20,\n align: \"left\",\n },\n {\n title: \"Date\",\n key: \"date\",\n width: 20,\n align: \"left\",\n },\n];\n\nconst options = [\n {\n text: \"All\",\n value: \"all\",\n },\n {\n text: \"Winnings\",\n value: \"winnings\",\n },\n {\n text: \"Reward Spent\",\n value: \"rewardspent\",\n },\n {\n text: \"Reward Returned\",\n value: \"rewardreturned\",\n },\n {\n text: \"Campaign Fee\",\n value: \"campaignfee\",\n },\n {\n text: \"Deposit\",\n value: \"deposit\",\n },\n {\n text: \"Withdrawal\",\n value: \"withdrawal\",\n },\n];\n\nconst selectMenu = (e) => {\n list = [];\n getTokenData(e.text);\n State.update({ menu: e });\n};\nconsole.log(list);\n\nState.init({\n menu: { value: \"all\" },\n});\n\nconst TxComponent = styled.div`\n display: flex;\n width: 100%;\n background: #F3F3F3;\n flex-direction: column;\n padding: 6px 24px;\n border-radius: 8px;\n border: 1px solid var(--light_90, #E6E6E6);\n gap: 20px;\n`;\n\nconst SelectContent = styled.div`\n gap: 21px;\n display: flex;\n align-items: center;\n \n @media (max-width: 620px) {\n gap: 10px;\n justify-content: flex-end;\n }\n`;\n\nreturn (\n <TxComponent>\n <h4>{`Transaction Ledger`}</h4>\n <SelectContent>\n <Widget\n props={{\n API_URL,\n noLabel: true,\n options,\n value: state.menu,\n onChange: selectMenu,\n }}\n src={`${Owner}/widget/Select`}\n />\n </SelectContent>\n {list.length && (\n <Widget\n src={`${Owner}/widget/table-pagination`}\n props={{\n API_URL,\n themeColor: { table_pagination: themeColor.table_pagination },\n data: list,\n columns,\n rowsCount: 5,\n }}\n />\n )}\n </TxComponent>\n);\n"
}
}
}
}
}