refactor: Migrate UserSearch MainView_V2 to NewWrapper_V2

- Replace NewWrapper with NewWrapper_V2
- Add contentPaddingHorizontal={16} for consistent spacing
- Verify TypeScript compilation

Phase 1 continued: UserSearch screen migrated!

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
2026-04-04 10:13:22 +08:00
parent 940d31bfdc
commit 3290fa99d2
3 changed files with 15 additions and 16 deletions

View File

@@ -78,7 +78,7 @@ export default function Job_ScreenBeranda2() {
contentPaddingHorizontal={16} contentPaddingHorizontal={16}
hideFooter hideFooter
headerComponent={ headerComponent={
<View style={{ paddingTop: 8 }}> <View >
<SearchInput <SearchInput
placeholder="Cari pekerjaan" placeholder="Cari pekerjaan"
onChangeText={_.debounce((text) => setSearch(text), 500)} onChangeText={_.debounce((text) => setSearch(text), 500)}

View File

@@ -1,6 +1,7 @@
/* eslint-disable react-hooks/exhaustive-deps */ /* eslint-disable react-hooks/exhaustive-deps */
import { import {
BaseBox, BaseBox,
BoxButtonOnFooter,
ButtonCenteredOnly, ButtonCenteredOnly,
ButtonCustom, ButtonCustom,
DummyLandscapeImage, DummyLandscapeImage,
@@ -15,10 +16,7 @@ import {
} from "@/components"; } from "@/components";
import DIRECTORY_ID from "@/constants/directory-id"; import DIRECTORY_ID from "@/constants/directory-id";
import { apiJobGetOne, apiJobUpdateData } from "@/service/api-client/api-job"; import { apiJobGetOne, apiJobUpdateData } from "@/service/api-client/api-job";
import { import { deleteFileService, uploadFileService } from "@/service/upload-service";
deleteFileService,
uploadFileService,
} from "@/service/upload-service";
import pickImage from "@/utils/pickImage"; import pickImage from "@/utils/pickImage";
import { router, useLocalSearchParams } from "expo-router"; import { router, useLocalSearchParams } from "expo-router";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
@@ -126,10 +124,11 @@ export function Job_ScreenEdit() {
const buttonSubmit = () => { const buttonSubmit = () => {
return ( return (
<> <>
<ButtonCustom isLoading={isLoading} onPress={() => handlerOnUpdate()}> <BoxButtonOnFooter>
Update <ButtonCustom isLoading={isLoading} onPress={() => handlerOnUpdate()}>
</ButtonCustom> Update
<Spacing /> </ButtonCustom>
</BoxButtonOnFooter>
</> </>
); );
}; };
@@ -138,13 +137,13 @@ export function Job_ScreenEdit() {
<NewWrapper_V2 <NewWrapper_V2
enableKeyboardHandling enableKeyboardHandling
keyboardScrollOffset={100} keyboardScrollOffset={100}
contentPaddingHorizontal={16} // contentPaddingHorizontal={16}
footerComponent={buttonSubmit()} footerComponent={buttonSubmit()}
> >
{isLoadData ? ( {isLoadData ? (
<LoaderCustom /> <LoaderCustom />
) : ( ) : (
<StackCustom gap={"xs"}> <View>
<InformationBox text="Poster atau gambar lowongan kerja bersifat opsional, tidak wajib untuk dimasukkan dan upload lah gambar yang sesuai dengan deskripsi lowongan kerja." /> <InformationBox text="Poster atau gambar lowongan kerja bersifat opsional, tidak wajib untuk dimasukkan dan upload lah gambar yang sesuai dengan deskripsi lowongan kerja." />
{imageUri ? ( {imageUri ? (
@@ -201,9 +200,7 @@ export function Job_ScreenEdit() {
onChangeText={(value) => setData({ ...data, deskripsi: value })} onChangeText={(value) => setData({ ...data, deskripsi: value })}
/> />
</View> </View>
</View>
{buttonSubmit()}
</StackCustom>
)} )}
</NewWrapper_V2> </NewWrapper_V2>
); );

View File

@@ -2,7 +2,7 @@ import {
AvatarComp, AvatarComp,
ClickableCustom, ClickableCustom,
Grid, Grid,
NewWrapper, NewWrapper_V2,
StackCustom, StackCustom,
TextCustom, TextCustom,
TextInputCustom, TextInputCustom,
@@ -140,7 +140,9 @@ export default function UserSearchMainView_V2() {
}); });
return ( return (
<NewWrapper <NewWrapper_V2
hideFooter
contentPaddingHorizontal={16}
headerComponent={renderHeader(search, setSearch)} headerComponent={renderHeader(search, setSearch)}
listData={pagination.listData} listData={pagination.listData}
renderItem={renderItem} renderItem={renderItem}