11import AsyncStorage from "@react-native-async-storage/async-storage" ;
22
3- import React , { Component } from "react" ;
3+ import React from "react" ;
44import { View , ScrollView , Text , TouchableHighlight } from "react-native" ;
5-
5+ import { LinearGradient } from "expo-linear-gradient" ;
66export default class History extends React . Component {
77 constructor ( props ) {
88 super ( props ) ;
@@ -107,7 +107,20 @@ export default class History extends React.Component {
107107 historyData . push (
108108 < TouchableHighlight
109109 key = { i }
110- style = { { width : "90%" , marginTop : 10 } }
110+ style = { {
111+ width : "90%" ,
112+ marginTop : 10 ,
113+ borderRadius : 8 ,
114+ shadowColor : "#000" ,
115+ shadowOffset : {
116+ width : 0 ,
117+ height : 2 ,
118+ } ,
119+ shadowOpacity : 0.25 ,
120+ shadowRadius : 3.84 ,
121+ overflow : "hidden" ,
122+ elevation : 5 ,
123+ } }
111124 onPress = { ( ) =>
112125 this . props . navigation . navigate (
113126 allData [ i ] [ 1 ] [ "algorithm" ] ,
@@ -116,9 +129,28 @@ export default class History extends React.Component {
116129 }
117130 >
118131 < View
119- backgroundColor = "black"
120- style = { { padding : 10 , backgroundColor : "black" } }
132+ style = { {
133+ padding : 10 ,
134+ backgroundColor : "#020b5e" ,
135+ display : "flex" ,
136+ alignItems : "flex-start" ,
137+ justifyContent : "center" ,
138+ width : "100%" ,
139+ borderRadius : 8 ,
140+ overflow : "hidden" ,
141+ } }
121142 >
143+ < LinearGradient
144+ colors = { [ "#004e92" , "transparent" ] }
145+ style = { {
146+ position : "absolute" ,
147+ left : 0 ,
148+ right : 0 ,
149+ top : 0 ,
150+ height : "100%" ,
151+ borderRadius : 8 ,
152+ } }
153+ />
122154 < Text style = { { color : "white" } } > { allData [ i ] [ 1 ] [ "date" ] } </ Text >
123155 < Text style = { { color : "white" } } > { allData [ i ] [ 1 ] [ "algorithm" ] } </ Text >
124156 </ View >
@@ -131,28 +163,43 @@ export default class History extends React.Component {
131163 render ( ) {
132164 const state = this . state ;
133165 return (
134- < ScrollView >
166+ < ScrollView style = { { backgroundColor : "white" } } >
135167 < View
136168 style = { {
137169 display : "flex" ,
138170 flexDirection : "column" ,
139171 alignItems : "center" ,
140172 justifyContent : "center" ,
173+ paddingBottom : 30 ,
141174 } }
142175 >
143176 < TouchableHighlight
144- style = { { width : "90%" , marginTop : 10 } }
177+ style = { {
178+ width : "90%" ,
179+ marginTop : 10 ,
180+ shadowColor : "#000" ,
181+ shadowOffset : {
182+ width : 0 ,
183+ height : 2 ,
184+ } ,
185+ shadowOpacity : 0.25 ,
186+ shadowRadius : 3.84 ,
187+ overflow : "hidden" ,
188+ elevation : 5 ,
189+ } }
145190 onPress = { this . clearHistory }
146191 >
147192 < View
148193 backgroundColor = "red"
149194 style = { {
150195 padding : 10 ,
196+ backgroundColor : "red" ,
151197 display : "flex" ,
152- flexDirection : "column" ,
153198 alignItems : "center" ,
154199 justifyContent : "center" ,
155- backgroundColor : "red" ,
200+ width : "100%" ,
201+ borderRadius : 4 ,
202+ overflow : "hidden" ,
156203 } }
157204 >
158205 < Text style = { { color : "white" , fontWeight : "bold" } } >
0 commit comments