Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KAN-135] 검색 > 자동완성 카테고리 추가 + 자동완성 화면 디자인 수정 #43

Merged
merged 1 commit into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/assets/svg.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 24 additions & 9 deletions src/screens/detail/SearchScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@ export default function SearchScreen(props) {
headers: {Authorization: `Bearer ${context.accessToken}`},
});

console.log('response:', response.data.results);

setAutoCompleteData(response.data.results);
const limitedResults = response.data.results.slice(0, 5);
setAutoCompleteData(limitedResults);
} catch (e) {
console.log('error', e);
}
Expand Down Expand Up @@ -118,7 +117,10 @@ export default function SearchScreen(props) {
<>
<Header title={'검색'} isBackButton={true} />
<View style={styles.entire}>
<View style={{alignItems: 'center', marginBottom: 20}}>
<View style={{
alignItems: 'center',
marginBottom: searchText.length == 0 ? 20: 0,
}}>
{/* 검색창 */}
<View
style={{
Expand Down Expand Up @@ -238,6 +240,8 @@ export default function SearchScreen(props) {
}}>
<SvgXml xml={svgXml.icon.search} width="18" height="18" />
<Text style={styles.buttonText}>{item.org_display}</Text>
<View style={{flex: 1}} />
<Text style={styles.categoryText}>{item.category}</Text>
</AnimatedButton>
);
}}
Expand All @@ -256,10 +260,11 @@ const styles = StyleSheet.create({
alignItems: 'center',
},
textInput: {
marginLeft: 10,
marginLeft: 4,
flex: 1,
fontSize: 12,
fontSize: 14,
color: COLOR_TEXT_BLACK,
fontFamily: 'NanumSquareRound',
padding: 0,
},
recentHeader: {
Expand Down Expand Up @@ -300,15 +305,25 @@ const styles = StyleSheet.create({
width: windowWidth,
},
listButton: {
// backgroundColor: 'blue',
marginStart: 18,
padding: 8,
paddingHorizontal: 16,
flexDirection: 'row',
alignItems: 'center',
},
buttonText: {
fontSize: 12,
fontSize: 13,
color: COLOR_TEXT_BLACK,
fontWeight: 'normal',
marginStart: 6,
fontFamily: 'NanumSquareRound',
marginLeft: 2,
},
categoryText: {
fontSize: 12,
color: COLOR_PRIMARY,
marginStart: 6,
fontFamily: 'NanumSquareRoundEB',
textAlign: 'right',
marginBottom: 2.5,
}
});
Loading