sslops page finished

This commit is contained in:
Emily Liu 2020-08-22 20:05:42 -04:00
parent ec2c2f446e
commit 219a12d84c

View File

@ -22,11 +22,11 @@ import { url } from './resources/fetchInfo.json';
const SSLElement = ({item}) => { const SSLElement = ({item}) => {
const [visible, setVisible] = useState(0) const [visible, setVisible] = useState(0)
const extra = visible?(<Text>{'\n'}{item.item.title} {"\n\n"}Details: {item.item.text}{"\n\n"}Where: {item.item.loc}{"\n\n"}Teacher: {item.item.teacher}</Text>):(<></>); const extra = visible?(<Text>{'\n'}Details: {item.item.text}{"\n\n"}Where: {item.item.loc}{"\n\n"}Teacher: {item.item.teacher}</Text>):(<></>);
return( return(
<View> <View>
<TouchableOpacity style={styles.item} onPress={()=>setVisible(!visible)} activeOpacity={0.8}> <TouchableOpacity style={styles.item} onPress={()=>setVisible(!visible)} activeOpacity={0.8}>
<Text style={styles.title}>{item.item.name}</Text> <Text style={styles.title}>{item.item.title}</Text>
{extra} {extra}
</TouchableOpacity> </TouchableOpacity>
</View> </View>