Skip to content

Commit

Permalink
feat: enhance tab screen with blur effect and update action buttons
Browse files Browse the repository at this point in the history
- 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>
  • Loading branch information
Innei committed Jan 17, 2025
1 parent 818b024 commit 13cdee0
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions apps/mobile/src/screens/(stack)/(tabs)/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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>
Expand All @@ -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>
)
}
Expand All @@ -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} />
Expand Down

0 comments on commit 13cdee0

Please sign in to comment.