2024-03-15 23:24:08 +01:00
|
|
|
import { useState } from "react"
|
2024-03-15 14:19:58 +01:00
|
|
|
import { StyleSheet } from "react-native"
|
2024-03-15 15:30:19 +01:00
|
|
|
import { Calendar } from "react-native-calendars"
|
2024-03-15 14:19:58 +01:00
|
|
|
import { SafeAreaView } from "react-native-safe-area-context"
|
|
|
|
|
2024-03-15 23:24:08 +01:00
|
|
|
const HistoryPage: React.FC = () => {
|
2024-03-15 15:30:19 +01:00
|
|
|
const [selected, setSelected] = useState("")
|
|
|
|
|
2024-03-15 14:19:58 +01:00
|
|
|
return (
|
|
|
|
<SafeAreaView style={styles.container}>
|
2024-03-15 15:30:19 +01:00
|
|
|
<Calendar
|
|
|
|
onDayPress={(day) => {
|
|
|
|
setSelected(day.dateString)
|
|
|
|
}}
|
|
|
|
markedDates={{
|
|
|
|
"2023-03-01": { selected: true, marked: true, selectedColor: "blue" },
|
|
|
|
"2023-03-02": { marked: true },
|
|
|
|
"2023-03-03": { selected: true, marked: true, selectedColor: "blue" },
|
|
|
|
[selected]: {
|
|
|
|
selected: true,
|
|
|
|
disableTouchEvent: true,
|
|
|
|
selectedColor: "orange",
|
|
|
|
},
|
|
|
|
}}
|
|
|
|
theme={{
|
|
|
|
backgroundColor: "#000000",
|
|
|
|
calendarBackground: "#000000",
|
|
|
|
textSectionTitleColor: "#b6c1cd",
|
|
|
|
selectedDayBackgroundColor: "#00adf5",
|
|
|
|
selectedDayTextColor: "#ffffff",
|
|
|
|
todayTextColor: "#00adf5",
|
|
|
|
dayTextColor: "#2d4150",
|
|
|
|
textDisabledColor: "#d9efff",
|
|
|
|
}}
|
|
|
|
/>
|
2024-03-15 14:19:58 +01:00
|
|
|
</SafeAreaView>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
|
|
|
container: {
|
|
|
|
flex: 1,
|
|
|
|
alignItems: "center",
|
|
|
|
justifyContent: "center",
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
2024-03-15 23:24:08 +01:00
|
|
|
export default HistoryPage
|