Messenger/packages/mobile/app/(app)/forward.tsx
Заид Омар Медхат | Zaid Omar Medhat f653b083aa f
2026-07-13 12:32:00 +05:00

14 lines
645 B
TypeScript

import type { ReactElement } from 'react';
import { useLocalSearchParams } from 'expo-router';
import { ForwardScreen } from '@/features/messaging';
export default function ForwardRoute(): ReactElement | null {
const params = useLocalSearchParams<{ ids: string; from: string }>();
const idsParam = typeof params.ids === 'string' ? params.ids : '';
const from = typeof params.from === 'string' ? params.from : null;
const messageIds = idsParam.split(',').filter((id) => id.length > 0);
if (from === null || messageIds.length === 0) {
return null;
}
return <ForwardScreen messageIds={messageIds} fromConversationId={from} />;
}