From a4f6668bf85ef456bf376585d121eab8ae4fa411 Mon Sep 17 00:00:00 2001 From: peanut-lover Date: Thu, 18 Nov 2021 01:45:18 +0900 Subject: [PATCH 1/7] =?UTF-8?q?[#4]=20feat:=20ProfileImage=20=EC=BB=B4?= =?UTF-8?q?=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ProfileImage.tsx | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/components/ProfileImage.tsx diff --git a/src/components/ProfileImage.tsx b/src/components/ProfileImage.tsx new file mode 100644 index 0000000..ced1bee --- /dev/null +++ b/src/components/ProfileImage.tsx @@ -0,0 +1,42 @@ +import React from "react"; +import { ImageSourcePropType } from "react-native"; +import styled from "styled-components/native"; + +type ProfileImageSize = "sm" | "md" | "lg"; + +const SizeMap: { [k in ProfileImageSize]: number } = { + sm: 50, + md: 100, + lg: 150, +}; + +type ContainerProps = { + size: ProfileImageSize; +}; + +const Container = styled.View` + width: ${(props) => SizeMap[props.size] + "px"}; + height: ${(props) => SizeMap[props.size] + "px"}; + border-radius: ${(props) => SizeMap[props.size] / 2 + "px"}; + overflow: hidden; +`; + +const Image = styled.Image` + width: ${(props) => SizeMap[props.size] + "px"}; + height: ${(props) => SizeMap[props.size] + "px"}; +`; + +interface Props { + size: ProfileImageSize; + image: ImageSourcePropType; +} + +const ProfileImage: React.FC = ({ size = "sm", image }) => { + return ( + + + + ); +}; + +export default ProfileImage; From eb00b94c3e018a3bcc9371286f8c50938e8a9e4c Mon Sep 17 00:00:00 2001 From: peanut-lover Date: Thu, 18 Nov 2021 02:02:12 +0900 Subject: [PATCH 2/7] =?UTF-8?q?[#4]=20feat:=20=EB=8C=80=ED=99=94=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=20=EB=A0=88=EC=9D=B4=EC=95=84=EC=9B=83=20?= =?UTF-8?q?=EA=B5=AC=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 23 ++++- src/img/chat_bubble.svg | 3 + src/img/smile_1.png | Bin 0 -> 2125 bytes src/screens/Chat.tsx | 13 --- src/screens/Chat/UserCard.tsx | 43 +++++++++ src/screens/Chat/index.tsx | 165 ++++++++++++++++++++++++++++++++++ 6 files changed, 231 insertions(+), 16 deletions(-) create mode 100644 src/img/chat_bubble.svg create mode 100644 src/img/smile_1.png delete mode 100644 src/screens/Chat.tsx create mode 100644 src/screens/Chat/UserCard.tsx create mode 100644 src/screens/Chat/index.tsx diff --git a/src/App.tsx b/src/App.tsx index a6c09da..c383bd8 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { SafeAreaView, StyleSheet } from "react-native"; +import { Button, SafeAreaView, StyleSheet, Text, View } from "react-native"; import { createNativeStackNavigator } from "@react-navigation/native-stack"; import Home from "./screens/Home"; @@ -15,7 +15,15 @@ const SafeAreaViewContainer = styled(SafeAreaView)` flex: 1; `; -const Stack = createNativeStackNavigator(); +export type RootStackParamList = { + Home: undefined; + Matching: undefined; + Chat: undefined; + Feedback: undefined; + History: undefined; +}; + +const Stack = createNativeStackNavigator(); export default function App() { return ( @@ -29,7 +37,16 @@ export default function App() { > - + diff --git a/src/img/chat_bubble.svg b/src/img/chat_bubble.svg new file mode 100644 index 0000000..0fd91c6 --- /dev/null +++ b/src/img/chat_bubble.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/img/smile_1.png b/src/img/smile_1.png new file mode 100644 index 0000000000000000000000000000000000000000..3aefeb5ae2e0847e4e5d3fce62186d9e306327f2 GIT binary patch literal 2125 zcmV-T2(tHyP);Isuz-w_PTRMg=XJCPvC(T!siIxRLHYT4;Afl-mxpD?-{1)7El> z6GrU94sEs_5VWjC>ZAz?VWbVDYLuYSKeV;qe!u6WZT{G?9mjSOK2j9Nf71Bd-~0V} ze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