managarten/apps-archived/memoro/apps/mobile/components/molecules/MemoScrollView.tsx
Till-JS 61d181fbc2 chore: archive inactive projects to apps-archived/
Move inactive projects out of active workspace:
- bauntown (community website)
- maerchenzauber (AI story generation)
- memoro (voice memo app)
- news (news aggregation)
- nutriphi (nutrition tracking)
- reader (reading app)
- uload (URL shortener)
- wisekeep (AI wisdom extraction)

Update CLAUDE.md documentation:
- Add presi to active projects
- Document archived projects section
- Update workspace configuration

Archived apps can be re-activated by moving back to apps/

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 07:03:59 +01:00

59 lines
1.6 KiB
TypeScript

import React, { forwardRef, useEffect, useRef } from 'react';
import { ScrollView, ScrollViewProps, Text } from 'react-native';
/**
* Wrapper around ScrollView with forwardRef to ensure ref works properly
*/
const MemoScrollView = forwardRef<ScrollView, ScrollViewProps>((props, ref) => {
const internalRef = useRef<ScrollView>(null);
console.log('MemoScrollView rendering');
console.log('MemoScrollView props:', Object.keys(props));
// Try syncing in useEffect
useEffect(() => {
console.log('MemoScrollView useEffect - internalRef.current:', internalRef.current);
if (internalRef.current) {
console.log('Setting forwarded ref from useEffect');
if (typeof ref === 'function') {
ref(internalRef.current);
} else if (ref) {
(ref as any).current = internalRef.current;
}
}
}, [internalRef.current]);
console.log('About to render ScrollView...');
return (
<>
<Text style={{ color: 'red', fontSize: 20 }}>DEBUG: ScrollView is rendering</Text>
<ScrollView
ref={(scrollViewRef) => {
console.log('=== MemoScrollView ref callback fired ===');
console.log('ref value:', scrollViewRef);
console.log('ref is null:', scrollViewRef === null);
// Set both refs
internalRef.current = scrollViewRef;
// Set the forwarded ref
if (scrollViewRef) {
if (typeof ref === 'function') {
ref(scrollViewRef);
} else if (ref) {
(ref as any).current = scrollViewRef;
}
console.log('Forwarded ref set successfully!');
}
}}
{...props}
/>
</>
);
});
MemoScrollView.displayName = 'MemoScrollView';
export default MemoScrollView;