feat: enhance tab screen with blur effect and update action buttons
- Added BlurEffect to the header for improved aesthetics. - Replaced the Edit button with a drawer opener icon for better UX. - Removed unused SortActionButton from the right action area. Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
@@ -3,12 +3,13 @@ import { useEffect } from "react"
|
||||
import { Text, TouchableOpacity, View } from "react-native"
|
||||
import { useSafeAreaInsets } from "react-native-safe-area-context"
|
||||
|
||||
import { BlurEffect } from "@/src/components/common/HeaderBlur"
|
||||
import { SafeNavigationScrollView } from "@/src/components/common/SafeNavigationScrollView"
|
||||
import { views } from "@/src/constants/views"
|
||||
import { AddCuteReIcon } from "@/src/icons/add_cute_re"
|
||||
import { LayoutLeftbarOpenCuteReIcon } from "@/src/icons/layout_leftbar_open_cute_re"
|
||||
import { useFeedDrawer, useSetDrawerSwipeDisabled } from "@/src/modules/feed-drawer/atoms"
|
||||
import { useCurrentView } from "@/src/modules/subscription/atoms"
|
||||
import { SortActionButton } from "@/src/modules/subscription/header-actions"
|
||||
import { usePrefetchUnread } from "@/src/store/unread/hooks"
|
||||
import { accentColor } from "@/src/theme/colors"
|
||||
|
||||
@@ -32,8 +33,10 @@ export default function Index() {
|
||||
headerLeft: LeftAction,
|
||||
headerRight: RightAction,
|
||||
headerTransparent: true,
|
||||
headerBackground: BlurEffect,
|
||||
}}
|
||||
/>
|
||||
|
||||
<SafeNavigationScrollView>
|
||||
<View className="flex min-h-96 items-center justify-center bg-zinc-300">
|
||||
<Text className="text-center text-2xl text-accent">EntryList Placeholder</Text>
|
||||
@@ -50,16 +53,12 @@ const useActionPadding = () => {
|
||||
|
||||
function LeftAction() {
|
||||
const { openDrawer } = useFeedDrawer()
|
||||
const handleEdit = () => {
|
||||
openDrawer()
|
||||
//TODO
|
||||
}
|
||||
|
||||
const insets = useActionPadding()
|
||||
|
||||
return (
|
||||
<TouchableOpacity onPress={handleEdit} style={{ paddingLeft: insets.paddingLeft }}>
|
||||
<Text className="text-lg text-accent">Edit</Text>
|
||||
<TouchableOpacity onPress={openDrawer} style={{ paddingLeft: insets.paddingLeft }}>
|
||||
<LayoutLeftbarOpenCuteReIcon color={accentColor} />
|
||||
</TouchableOpacity>
|
||||
)
|
||||
}
|
||||
@@ -69,7 +68,6 @@ function RightAction() {
|
||||
|
||||
return (
|
||||
<View className="flex-row items-center gap-4" style={{ paddingRight: insets.paddingRight }}>
|
||||
<SortActionButton />
|
||||
<Link asChild href="/add">
|
||||
<TouchableOpacity className="size-6">
|
||||
<AddCuteReIcon color={accentColor} />
|
||||
|
||||
Reference in New Issue
Block a user