feat(content): add rich content rendering with @mentions and vote segments
- Add PostContentRenderer component for rendering posts/comments with segments - Add PostMentionInput component for @mention support in post/comment creation - Add VoteSegmentData and vote segment type for unified post creation API - Update post and comment services to support segments in API requests - Fix auth service to clear tokens before login/register - Improve database initialization with proper close/retry logic - Add verification check before allowing post creation - Add metro web shims for react-native-webrtc full package and requireNativeComponent - Update build config with git hash based version numbers
This commit is contained in:
18
web-shims/react-native/Libraries/ReactNative/requireNativeComponent.js
vendored
Normal file
18
web-shims/react-native/Libraries/ReactNative/requireNativeComponent.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
const React = require('react');
|
||||
|
||||
function requireNativeComponent(componentName) {
|
||||
const componentNameClean = componentName
|
||||
.replace(/^RNC/, '')
|
||||
.replace(/^RNS/, '')
|
||||
.replace(/^RN/, '');
|
||||
|
||||
const NativeComponent = React.forwardRef((props, ref) => {
|
||||
const { children, ...rest } = props;
|
||||
return React.createElement('div', { ...rest, ref, 'data-native-component': componentNameClean }, children);
|
||||
});
|
||||
NativeComponent.displayName = componentName;
|
||||
|
||||
return NativeComponent;
|
||||
}
|
||||
|
||||
module.exports = requireNativeComponent;
|
||||
Reference in New Issue
Block a user