feat: Implement PageWrapper and migrate all Job screens
Create PageWrapper component that routes to: - iOS: NewWrapper (stable, tested) - Android: NewWrapper_V2 (keyboard handling fix) New Files: - components/_ShareComponent/PageWrapper.tsx - docs/PAGEWRAPPER-USAGE.md Migrated Job Screens (10): - screens/Job/ScreenJobCreate.tsx: NewWrapper_V2 → PageWrapper - screens/Job/ScreenJobEdit.tsx: NewWrapper_V2 → PageWrapper - screens/Job/ScreenArchive.tsx: ViewWrapper → PageWrapper - screens/Job/ScreenArchive2.tsx: NewWrapper_V2 → PageWrapper - screens/Job/ScreenBeranda2.tsx: NewWrapper_V2 → PageWrapper - screens/Job/MainViewStatus2.tsx: NewWrapper_V2 → PageWrapper - app/(application)/(user)/job/[id]/index.tsx: ViewWrapper → PageWrapper - app/(application)/(user)/job/[id]/archive.tsx: ViewWrapper → PageWrapper - app/(application)/(user)/job/[id]/[status]/detail.tsx: NewWrapper_V2 → PageWrapper Benefits: - iOS users (70%+) get stable NewWrapper - Android users get keyboard handling fix - Clean API - no Platform.OS checks in screens - Easy future migration path Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* eslint-disable react-hooks/exhaustive-deps */
|
||||
import { BaseBox, NewWrapper_V2, ScrollableCustom, TextCustom } from "@/components";
|
||||
import { BaseBox, PageWrapper, ScrollableCustom, TextCustom } from "@/components";
|
||||
import { MainColor } from "@/constants/color-palet";
|
||||
import { PAGINATION_DEFAULT_TAKE } from "@/constants/constans-value";
|
||||
import { createPaginationComponents } from "@/helpers/paginationHelpers";
|
||||
@@ -86,7 +86,7 @@ export default function Job_MainViewStatus2() {
|
||||
);
|
||||
|
||||
return (
|
||||
<NewWrapper_V2
|
||||
<PageWrapper
|
||||
contentPaddingHorizontal={16}
|
||||
headerComponent={<View style={{ paddingTop: 8 }}>{scrollComponent}</View>}
|
||||
listData={pagination.listData}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* eslint-disable react-hooks/exhaustive-deps */
|
||||
import { BaseBox, LoaderCustom, TextCustom, ViewWrapper } from "@/components";
|
||||
import { BaseBox, LoaderCustom, PageWrapper, TextCustom } from "@/components";
|
||||
import { useAuth } from "@/hooks/use-auth";
|
||||
import { apiJobGetAll } from "@/service/api-client/api-job";
|
||||
import { useFocusEffect } from "expo-router";
|
||||
@@ -33,7 +33,7 @@ export default function Job_ScreenArchive() {
|
||||
};
|
||||
|
||||
return (
|
||||
<ViewWrapper hideFooter>
|
||||
<PageWrapper hideFooter>
|
||||
{isLoadData ? (
|
||||
<LoaderCustom />
|
||||
) : _.isEmpty(listData) ? (
|
||||
@@ -52,6 +52,6 @@ export default function Job_ScreenArchive() {
|
||||
</BaseBox>
|
||||
))
|
||||
)}
|
||||
</ViewWrapper>
|
||||
</PageWrapper>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* eslint-disable react-hooks/exhaustive-deps */
|
||||
import { BaseBox, NewWrapper_V2, TextCustom, ViewWrapper } from "@/components";
|
||||
import { BaseBox, PageWrapper, TextCustom } from "@/components";
|
||||
import { MainColor } from "@/constants/color-palet";
|
||||
import { createPaginationComponents } from "@/helpers/paginationHelpers";
|
||||
import { useAuth } from "@/hooks/use-auth";
|
||||
@@ -55,7 +55,7 @@ export default function Job_ScreenArchive2() {
|
||||
);
|
||||
|
||||
return (
|
||||
<NewWrapper_V2
|
||||
<PageWrapper
|
||||
contentPaddingHorizontal={16}
|
||||
listData={pagination.listData}
|
||||
renderItem={renderJobItem}
|
||||
|
||||
@@ -2,12 +2,11 @@ import {
|
||||
AvatarUsernameAndOtherComponent,
|
||||
BoxWithHeaderSection,
|
||||
FloatingButton,
|
||||
NewWrapper_V2,
|
||||
PageWrapper,
|
||||
SearchInput,
|
||||
Spacing,
|
||||
StackCustom,
|
||||
TextCustom,
|
||||
ViewWrapper,
|
||||
} from "@/components";
|
||||
import { MainColor } from "@/constants/color-palet";
|
||||
import { createPaginationComponents } from "@/helpers/paginationHelpers";
|
||||
@@ -74,11 +73,11 @@ export default function Job_ScreenBeranda2() {
|
||||
);
|
||||
|
||||
return (
|
||||
<NewWrapper_V2
|
||||
<PageWrapper
|
||||
contentPaddingHorizontal={16}
|
||||
hideFooter
|
||||
headerComponent={
|
||||
<View >
|
||||
<View>
|
||||
<SearchInput
|
||||
placeholder="Cari pekerjaan"
|
||||
onChangeText={_.debounce((text) => setSearch(text), 500)}
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
ButtonCustom,
|
||||
InformationBox,
|
||||
LandscapeFrameUploaded,
|
||||
NewWrapper_V2,
|
||||
PageWrapper,
|
||||
Spacing,
|
||||
StackCustom,
|
||||
TextAreaCustom,
|
||||
@@ -118,7 +118,7 @@ export function Job_ScreenCreate() {
|
||||
};
|
||||
|
||||
return (
|
||||
<NewWrapper_V2
|
||||
<PageWrapper
|
||||
enableKeyboardHandling
|
||||
keyboardScrollOffset={100}
|
||||
contentPaddingHorizontal={16}
|
||||
@@ -175,6 +175,6 @@ export function Job_ScreenCreate() {
|
||||
/>
|
||||
</View>
|
||||
</StackCustom>
|
||||
</NewWrapper_V2>
|
||||
</PageWrapper>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
InformationBox,
|
||||
LandscapeFrameUploaded,
|
||||
LoaderCustom,
|
||||
NewWrapper_V2,
|
||||
PageWrapper,
|
||||
Spacing,
|
||||
StackCustom,
|
||||
TextAreaCustom,
|
||||
@@ -134,7 +134,7 @@ export function Job_ScreenEdit() {
|
||||
};
|
||||
|
||||
return (
|
||||
<NewWrapper_V2
|
||||
<PageWrapper
|
||||
enableKeyboardHandling
|
||||
keyboardScrollOffset={100}
|
||||
// contentPaddingHorizontal={16}
|
||||
@@ -202,6 +202,6 @@ export function Job_ScreenEdit() {
|
||||
</View>
|
||||
</View>
|
||||
)}
|
||||
</NewWrapper_V2>
|
||||
</PageWrapper>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user