diff --git a/src/common/HeartButton.tsx b/src/common/HeartButton.tsx index fdbc1bd..cb28ea9 100644 --- a/src/common/HeartButton.tsx +++ b/src/common/HeartButton.tsx @@ -11,10 +11,22 @@ interface HeartProps { const HeartButton = ({ like, onPress, blank }: HeartProps) => { return ( - - + + - ) -} + ); +}; -export default HeartButton; \ No newline at end of file +export default HeartButton; diff --git a/src/components/Home/Market/InfoPage.tsx b/src/components/Home/Market/InfoPage.tsx index 0651445..f8c6831 100644 --- a/src/components/Home/Market/InfoPage.tsx +++ b/src/components/Home/Market/InfoPage.tsx @@ -1,42 +1,69 @@ -import { useState, useEffect } from 'react'; -import { View, SafeAreaView, FlatList, Text } from 'react-native'; +import { View, StyleSheet } from 'react-native'; import { Tabs } from 'react-native-collapsible-tab-view'; import styled from 'styled-components/native'; import { Body14R, Body16B } from '../../../styles/GlobalText'; - +//TODO: ReformerProfilePage로 이름 수정 const InfoPage = () => { const data = [ - { label: '학교/학과', data: '업씨대학교 패션디자인학과'}, - { label: '실력/경력', data: '한국패션디자인공모전 동상\n업씨패션회사 인턴 6개월'}, - { label: '특수소재', data: '비즈, 퍼'}, - { label: '주요 활동지역', data: '서울 서대문구'}, - { label: '포트폴리오', data: ''} - ] + { + label: '소개글', + data: '안녕하세요 데님 전문 리폼러 하느리퐁퐁입니다!\n 어쩌구 저쩌구', + }, + { label: '오픈채팅 링크', data: 'https://www.naver.com' }, + { label: '주요 활동지역', data: '서울 서대문구' }, + { + label: '경력', + data: [ + '업씨대학교 패션디자인학과 졸업', + '한국패션디자인공모전 동상', + '업씨패션회사 인턴 6개월', + ], + }, + ]; return ( { + style={{ marginTop: 12 }} + renderItem={({ item }: any) => { return ( {item.label} - {item.data} + {item.label === '경력' ? ( + // item.data가 list인 경우 + + {item.data.map((itemData: string, index: number) => ( + {itemData} + ))} + + ) : ( + {item.data} + )} - ) + ); }} keyExtractor={(item, index) => index.toString()} /> - ) -} + ); +}; + +const styles = StyleSheet.create({ + flexColumn: { + display: 'flex', + flexDirection: 'column', + alignItems: 'flex-end', + }, +}); const InfoSection = styled.View` display: flex; flex-direction: row; justify-content: space-between; + align-items: flex-start; padding: 16px; border-bottom-width: 1px; - border-color: #DFDFDF; -` + border-color: #dfdfdf; +`; -export default InfoPage; \ No newline at end of file +export default InfoPage; diff --git a/src/components/Home/Market/MarketTabView.tsx b/src/components/Home/Market/MarketTabView.tsx index c582330..08d658e 100644 --- a/src/components/Home/Market/MarketTabView.tsx +++ b/src/components/Home/Market/MarketTabView.tsx @@ -1,87 +1,121 @@ -import React, { useEffect, useRef, useState } from 'react'; -import { SafeAreaView, ScrollView, View, FlatList, Text, TouchableOpacity, Image, ImageBackground } from 'react-native'; -import styled from 'styled-components/native'; +import React, { useRef, useState } from 'react'; +import { + SafeAreaView, + ScrollView, + View, + FlatList, + Text, + TouchableOpacity, + Image, + ImageBackground, + StyleSheet, +} from 'react-native'; import { Tabs, MaterialTabBar } from 'react-native-collapsible-tab-view'; -import { getStatusBarHeight } from 'react-native-safearea-height'; -import { Title20B, Body14R, Caption11M } from '../../../styles/GlobalText.tsx'; -import { BLACK, BLACK2 } from '../../../styles/GlobalColor.tsx'; +import { Caption11M } from '../../../styles/GlobalText.tsx'; +import { BLACK, BLACK2, PURPLE } from '../../../styles/GlobalColor.tsx'; +import StarIcon from '../../../assets/common/Star.svg'; import { StackScreenProps } from '@react-navigation/stack'; import { HomeStackParams } from '../../../pages/Home'; import InfoPage from './InfoPage.tsx'; -import ProductPage from './ServicePage.tsx'; -import ReviewPage from './ReviewPage.tsx'; -import Hashtag from '../../../common/Hashtag.tsx'; import Footer from '../../../common/Footer.tsx'; import Arrow from '../../../assets/common/Arrow.svg'; -import Pencil from '../../../assets/common/Pencil.svg'; import ServicePage from './ServicePage.tsx'; -import { CustomBackButton } from '../components/CustomBackButton.tsx'; import DetailScreenHeader from '../components/DetailScreenHeader.tsx'; -import { useBottomBar } from '../../../../contexts/BottomBarContext.tsx'; -import TextToggle from '../../../common/TextToggle.tsx'; -import ScrollToTopButton from '../../../common/ScrollToTopButtonFlat.tsx'; import ScrollTopButton from '../../../common/ScrollTopButton.tsx'; -import ReviewComment from '../components/ReviewComment.tsx'; export const ProfileSection = ({ navigation }: { navigation: any }) => { + const marketName: string = '이하늘의 마켓'; + const selfIntroduce: string = + '안녕하세요 리폼러 이하늘입니다! 저는 업씨대학교 패션디자인학과에 수석입학했고요 짱짱 천재에요'; + const rate: number = 4.5; // 평점 + const reviewNumber: number = 100; // 후기 개수 - const filter = [ - { id: 1, tag: '스포티' }, { id: 2, tag: '영캐주얼' }, { id: 3, tag: '깔끔' } - ] - const tagList = filter.map(item => item.tag); - const markerName = '이하늘의 마켓'; - const selfIntroduce = '안녕하세요 리폼러 이하늘입니다! 저는 업씨대학교 패션디자인학과에 수석입학했고요 짱짱 천재에요' return ( - { }} - rightButton='Edit' - onPressRight={() => { }} /> - - - - - {markerName} + - {/* 이 밑에거 지우면 이상하게 에러남... 그냥 냅둬도 되는 거라 무시하셔도 됩니다. */} - index.toString()} - renderItem={({ item }) => { - return ( - - ) - }} - /> - ) -} + ); +}; -const MarketTabView = ({ navigation, route }: StackScreenProps) => { +const ProfileHeader = ({ + marketName, + rate, + reviewNumber, +}: { + marketName: string; + rate: number; + reviewNumber: number; +}) => { + return ( + <> + {}} + rightButton="Edit" + onPressRight={() => {}} + /> + + + + + {marketName} + + + {rate} + ({reviewNumber}) + + {/* TODO: click event 걸기 */} + + + ); +}; +const MarketTabView = ({ + navigation, + route, +}: StackScreenProps) => { const [routes] = useState([ - { key: 'info', title: '정보' }, + { key: 'profile', title: '프로필' }, { key: 'service', title: '서비스' }, - { key: 'review', title: '리뷰' } ]); const flatListRef = useRef(null); const scrollRef = useRef(null); @@ -93,14 +127,14 @@ const MarketTabView = ({ navigation, route }: StackScreenProps ( - )} - > - {routes.map(route => - ( - {route.key === 'info' && } - {route.key === 'service' && - - - - - } - {route.key === 'review' && - - - - } - ) - )} + )}> + {routes.map(route => ( + + {route.key === 'profile' && } + {route.key === 'service' && ( + + + + + )} + + ))}