diff --git a/src/components/Home/Market/DetailBox.tsx b/src/components/Home/Market/DetailBox.tsx new file mode 100644 index 0000000..0f177bd --- /dev/null +++ b/src/components/Home/Market/DetailBox.tsx @@ -0,0 +1,41 @@ +import { useState, useEffect } from 'react'; +import { View, SafeAreaView, FlatList, Text } from 'react-native'; +import styled from 'styled-components/native'; +import { Body14R, Body16B } from '../../../styles/GlobalText'; + + +const DetailBoxPage = () => { + const data = [ + { label: '카테고리', data: '아우터'}, + { label: '재질', data: '데님'}, + { label: '스타일', data: '빈티지'}, + { label: '핏', data: '노멀'}, + { label: '제작 기간', data: '3주'}, + { label: '서비스 상세', data: '자유 양식'}, + ] + + return ( + { + return ( + + {item.label} + {item.data} + + ) + } } + /> + ) +} + +const InfoSection = styled.View` + display: flex; + flex-direction: row; + justify-content: space-between; + padding: 16px; + border-bottom-width: 1px; + border-color: #DFDFDF; +` + +export default DetailBoxPage; \ No newline at end of file diff --git a/src/components/Home/Market/DetailPage.tsx b/src/components/Home/Market/DetailPage.tsx index b3a2bc9..a0525ff 100644 --- a/src/components/Home/Market/DetailPage.tsx +++ b/src/components/Home/Market/DetailPage.tsx @@ -1,4 +1,4 @@ -import { Dimensions, SafeAreaView, ScrollView, Text, TextInput, TouchableOpacity, View, StyleSheet } from 'react-native'; +import { Dimensions, SafeAreaView, ScrollView, Text, TouchableOpacity, View, StyleSheet, useWindowDimensions } from 'react-native'; import { StackScreenProps, createStackNavigator } from '@react-navigation/stack'; import { HomeStackParams } from '../../../pages/Home'; import Arrow from '../../../assets/common/Arrow.svg'; @@ -7,34 +7,14 @@ import Search from '../../../assets/common/Search.svg'; import styled from "styled-components/native"; import { useRef, useState } from 'react'; import CustomHeader from '../../../common/CustomHeader'; +import DetailBox from './DetailBox'; +import OptionBox from './OptionBox'; import CardView from '../../../common/CardView'; +import Footer from '../../../common/Footer'; +import { TabBar, TabView } from 'react-native-tab-view'; const { width, height } = Dimensions.get("window"); -const SearchWrapper = styled.View` - display: flex; - width: 80%; - margin: 0 auto; - height: 36px; - flex-direction: row; - border-radius: 12px; -`; -const StyledInput = styled.TextInput` - width: 100%; - padding: 0 5%; - font-family: Pretendard Variable; -`; -const ResetButton = styled.TouchableOpacity` - position: absolute; - height: 100%; - right: 0px; - top: 0px; - width: 15%; - display: flex; - align-items: center; - justify-content: center; -`; - export type DetailPageStackParams = { DetailPage: undefined; } @@ -53,22 +33,25 @@ const DetailPageScreen = ({ navigation, route }: StackScreenProps) => { - const [search, setSearch] = useState(""); - const [isInfo, setIsInfo] = useState(true); - const inputRef = useRef(null); + const layout = useWindowDimensions(); + const [index, setIndex] = useState(0); const [data, setData] = useState([]); + const [routes] = useState([ + { key: 'detail', title: '상세설명'}, + { key: 'option', title: '옵션 및 유의사항' } + ]); - const isDetail = () => setIsInfo(true); - const isOption = () => setIsInfo(false); + const renderScene = ({ route }: any) => { + switch (route.key) { + case 'detail': + return ; + case 'option': + return ; + } + } return ( - - { - // navigation.navigate("Search"); - }} - onAlarm={() => {}} - /> + { navigation.goBack(); @@ -76,22 +59,21 @@ const DetailPageMainScreen = ({ navigation }: StackScreenProps - - ( - - // - )} - /> + ( + + // + )} + /> 서비스 이름 #키워드 #키워드 # 키워드 @@ -107,30 +89,36 @@ const DetailPageMainScreen = ({ navigation }: StackScreenProps - - 상세설명 - 옵션 및 유의사항 - - - - 제작 기간 - 3주 - - 서비스 상세 - - + ( + + )} + /> 후기(3) - - - - - 견적서 보내기 - - - - +