Skip to content

Commit 19f3a85

Browse files
committed
hooks重构项目
1 parent a092dcf commit 19f3a85

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ts/page/search/SearchPage.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ function SearchPage() {
141141
return <SearchVideoComponent item={item} />;
142142
};
143143

144-
const contentContainer = () => {
144+
const ContentContainer = () => {
145145
if (showLoading) {
146146
return (
147147
<Spinner
@@ -152,12 +152,12 @@ function SearchPage() {
152152
);
153153
}
154154
if (dataList == null || dataList.length === 0) {
155-
return keyWordContainerOrEmpty;
155+
return <KeyWordContainerOrEmpty />;
156156
}
157157
return (
158158
<View style={styles.searchVideoContainer}>
159159
<Text style={styles.searchKey}>
160-
— 「{keyword}」搜索结果共{total}个 —
160+
— 「{keyword.current}」搜索结果共{total}个 —
161161
</Text>
162162
<RefreshListView
163163
data={dataList}
@@ -177,7 +177,7 @@ function SearchPage() {
177177
);
178178
};
179179

180-
const keyWordContainerOrEmpty = () => {
180+
const KeyWordContainerOrEmpty = () => {
181181
if (showKeyWorkContainer) {
182182
return (
183183
<View>
@@ -216,7 +216,7 @@ function SearchPage() {
216216
});
217217
};
218218

219-
const searchView = () => {
219+
const SearchView = () => {
220220
if (Platform.OS === 'ios') {
221221
return null;
222222
} else {
@@ -245,9 +245,9 @@ function SearchPage() {
245245
onSubmitEditing={onSubmit}
246246
/>
247247
</View>
248-
{searchView}
248+
<SearchView />
249249
</View>
250-
{contentContainer}
250+
<ContentContainer />
251251
</SafeAreaView>
252252
);
253253
}

0 commit comments

Comments
 (0)