mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-25 22:14:38 +02:00
style: auto-format codebase with Prettier
Applied formatting to 1487+ files using pnpm format:write - TypeScript/JavaScript files - Svelte components - Astro pages - JSON configs - Markdown docs 13 files still need manual review (Astro JSX comments)
This commit is contained in:
parent
0241f5554c
commit
d36b321d9d
3952 changed files with 661498 additions and 739751 deletions
|
|
@ -8,57 +8,53 @@ import { useUnuploadedCount } from '~/features/storage/hooks/useUnuploadedCount'
|
|||
import { useInitializeUploadStatus } from '~/features/storage/store/uploadStatusStore';
|
||||
|
||||
export const HeaderButton = forwardRef<typeof Pressable, { onPress?: () => void }>(
|
||||
({ onPress }, ref) => {
|
||||
const { tw } = useTheme();
|
||||
({ onPress }, ref) => {
|
||||
const { tw } = useTheme();
|
||||
|
||||
// Initialize upload status store
|
||||
useInitializeUploadStatus();
|
||||
// Initialize upload status store
|
||||
useInitializeUploadStatus();
|
||||
|
||||
// Get count of unuploaded audio files
|
||||
const unuploadedCount = useUnuploadedCount();
|
||||
// Get count of unuploaded audio files
|
||||
const unuploadedCount = useUnuploadedCount();
|
||||
|
||||
const handlePress = async () => {
|
||||
try {
|
||||
await Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
|
||||
} catch (error) {
|
||||
console.debug('Haptic feedback error:', error);
|
||||
}
|
||||
onPress?.();
|
||||
};
|
||||
const handlePress = async () => {
|
||||
try {
|
||||
await Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
|
||||
} catch (error) {
|
||||
console.debug('Haptic feedback error:', error);
|
||||
}
|
||||
onPress?.();
|
||||
};
|
||||
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Pressable ref={ref} onPress={handlePress}>
|
||||
{({ pressed }) => (
|
||||
<Icon
|
||||
name="settings-outline"
|
||||
size={24}
|
||||
useThemeColor
|
||||
className={tw(`${pressed ? 'opacity-50' : 'opacity-100'}`)}
|
||||
/>
|
||||
)}
|
||||
</Pressable>
|
||||
{unuploadedCount > 0 && (
|
||||
<NotificationBadge
|
||||
count={unuploadedCount}
|
||||
size="small"
|
||||
style={styles.badge}
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Pressable ref={ref} onPress={handlePress}>
|
||||
{({ pressed }) => (
|
||||
<Icon
|
||||
name="settings-outline"
|
||||
size={24}
|
||||
useThemeColor
|
||||
className={tw(`${pressed ? 'opacity-50' : 'opacity-100'}`)}
|
||||
/>
|
||||
)}
|
||||
</Pressable>
|
||||
{unuploadedCount > 0 && (
|
||||
<NotificationBadge count={unuploadedCount} size="small" style={styles.badge} />
|
||||
)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
position: 'relative',
|
||||
marginRight: 16,
|
||||
},
|
||||
badge: {
|
||||
position: 'absolute',
|
||||
top: -2,
|
||||
right: -2,
|
||||
zIndex: 10,
|
||||
},
|
||||
container: {
|
||||
position: 'relative',
|
||||
marginRight: 16,
|
||||
},
|
||||
badge: {
|
||||
position: 'absolute',
|
||||
top: -2,
|
||||
right: -2,
|
||||
zIndex: 10,
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue