Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/dypark26/catchpill into feat…
Browse files Browse the repository at this point in the history
…ure/sortByTime
  • Loading branch information
arch-spatula committed Jan 12, 2023
2 parents 3262315 + 4261ac6 commit 6a2efc7
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 29 deletions.
Binary file modified assets/adaptive-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/GraphicStatus.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ const GraphicStatus = () => {
export default GraphicStatus;

const GraphicContainer = styled.View`
background-color: white;
align-items: center;
padding-bottom: 10px;
margin: 0 0 12px;
`;

const Supports = styled.View`
Expand Down
1 change: 1 addition & 0 deletions src/components/ToggleList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const ToggleListItemTitle = styled.Text`
const ToggleListItemTime = styled.Text`
font-size: 16px;
margin: 0 0 0 16px;
text-overflow: ellipsis;
`;

export default ToggleList;
11 changes: 10 additions & 1 deletion src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,14 @@ import ManageList from './ManageList';
import GraphicStatus from './GraphicStatus';
import TextButton from './TextButton';
import ToggleList from './ToggleList';
import CustomButton from './CustomButton';
import CustomInput from './CustomInput';

export { ManageList, TextButton, ToggleList, GraphicStatus };
export {
ManageList,
TextButton,
ToggleList,
GraphicStatus,
CustomButton,
CustomInput,
};
8 changes: 1 addition & 7 deletions src/screen/MainPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,10 @@ const MainPage = ({ navigation: { navigate } }) => {

return (
<View>
<GraphicStatus />
<TouchableOpacity
onPress={() => navigate('Stacks', { screen: '로그인' })}
>
<Text>로그아웃</Text>
</TouchableOpacity>
{/* GraphicStatus가 들어오는 자리 */}
<FlatList
data={pillList}
keyExtractor={(item) => item.id}
ListHeaderComponent={<GraphicStatus />}
renderItem={({ item: { pillName, id, time, isTaken } }) => (
<ToggleList
pillName={pillName}
Expand Down
43 changes: 23 additions & 20 deletions src/screen/MyPage.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from '@emotion/native';
import { Text, View, FlatList } from 'react-native';
import { ManageList } from '../components';
import { ManageList, CustomButton } from '../components';
import { useUID } from '../Hooks/useAuth';
import { useGetPillData } from '../Hooks/usePill';

Expand Down Expand Up @@ -36,20 +36,6 @@ const MyPage = ({ navigation: { navigate } }) => {
return (
<MyPageContainer>
<PageTitle>나의 약관리</PageTitle>
<AddPill
onPress={() =>
navigate('Stacks', {
screen: '수정 페이지',
params: {
isEdit: false,
eachPillName: '',
eachTime: JSON.stringify(new Date()),
},
})
}
>
<Text>약추가</Text>
</AddPill>
<FlatList
data={pillList}
keyExtractor={(item) => item.id}
Expand All @@ -61,6 +47,24 @@ const MyPage = ({ navigation: { navigate } }) => {
navigate={navigate}
/>
)}
ListFooterComponent={
<CustomButtonContainer>
<CustomButton
title="Login"
onPress={() =>
navigate('Stacks', {
screen: '수정 페이지',
params: {
isEdit: false,
eachPillName: '',
eachTime: JSON.stringify(new Date()),
},
})
}
buttonText="새로운 약 추가하기"
/>
</CustomButtonContainer>
}
/>
</MyPageContainer>
);
Expand All @@ -77,11 +81,10 @@ const PageTitle = styled.Text`
margin: 20px 16px;
`;

const AddPill = styled.TouchableOpacity`
background-color: #f8f8f8;
margin: 8px 16px;
height: 80px;
border-radius: 16px;
const CustomButtonContainer = styled.View`
width: 100%;
align-items: center;
margin: -8px 0 16px;
`;

export default MyPage;

0 comments on commit 6a2efc7

Please sign in to comment.