-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathApp.tsx
44 lines (37 loc) · 1.14 KB
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import React, { useState } from "react";
import { SafeAreaView, StyleSheet, Platform } from "react-native";
import CardList from "./src/components/CardList";
import Dropdown from "./src/components/Dropdown";
import ParallaxScrollView from "./src/components/ParallaxScrollView";
export default function App() {
const [selectedHP, setSelectedHP] = useState<string>("");
// Simple header image component could be added here
const HeaderImage = () => null;
const content = (
<>
<Dropdown onSelect={setSelectedHP} />
<CardList hp={selectedHP} />
</>
);
// Use ParallaxScrollView only on mobile platforms
if (Platform.OS !== "web") {
return (
<SafeAreaView style={styles.container}>
<ParallaxScrollView
headerImage={<HeaderImage />}
headerBackgroundColor={{ dark: "#1F2937", light: "#F3F4F6" }}
>
{content}
</ParallaxScrollView>
</SafeAreaView>
);
}
// Simpler layout for web
return <SafeAreaView style={styles.container}>{content}</SafeAreaView>;
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#111827",
},
});