import React, { useState } from 'react';
import {
SafeAreaView,
StyleSheet,
ScrollView,
View,
Text,
StatusBar,
FlatList,
TouchableOpacity,
Image,
Dimensions
} from 'react-native';
import {
Header,
LearnMoreLinks,
Colors,
DebugInstructions,
ReloadInstructions,
} from 'react-native/Libraries/NewAppScreen';
import { NavigationContainer } from '@react-navigation/native'
import { createStackNavigator } from '@react-navigation/stack'
import styles from './styles/liststyles';
import { url } from './resources/fetchInfo.json';
import LinearGradient from 'react-native-linear-gradient';
import Ionicons from 'react-native-vector-icons/Ionicons';
//import I18n from './i18n';
const Stack = createStackNavigator();
export const SSLInfo = ({route}) => {
const item = route.params;
console
return (
{item.text}
{item.teacher}
{item.loc}
)
}
function SSLElement (props) {
const item = props.item;
const [expand, setExpand] = useState(false);
return(
setExpand(!expand)}>
{item.item.title}
{expand?:}
{expand?Information{item.item.text}{'\n'}Sponsor{item.item.teacher}{'\n'}Location{item.item.loc}:<>>}
)
}
class SSLOps extends React.Component {
constructor(props) {
super(props)
this.state = {
data: []
}
}
componentDidMount() {
fetch(`${url}/api/en/sslOps`,{
headers: {
'Cache-Control': 'no-cache'
}
}
)
.then((response) => {
return response.text();
})
.then((json) => {
this.setState({data: JSON.parse(json).ops});
})
.catch((error) => console.error(error))
}
render() {
return (
}
keyExtractor={item=>JSON.stringify(item)}
/>
)
}
}
export default SSLOps;