fix(mobile): resolve all TypeScript errors from integration
- Fix voiceStore method names (toggleMic, leaveVoice, setCurrentVoiceChannel) - Fix MemberWithUser nested user property access - Pass required channelId props to MessageList, TypingIndicator, MessageInput - Fix ConfirmDialog props (isOpen, description, variant, onClose) - Add mobileStyle prop to Modal component (fullscreen + sheet modes) - Fix fromId/isAdmin camelCase property names - Guard possibly undefined touch events and array accesses - Fix notification channelId resolution
This commit is contained in:
@@ -27,7 +27,7 @@ export function MobileSpacesScreen() {
|
||||
|
||||
const voiceUsers = useVoiceStore((s) => s.voiceUsers);
|
||||
const currentVoiceChannelId = useVoiceStore((s) => s.currentVoiceChannelId);
|
||||
const joinChannel = useVoiceStore((s) => s.joinChannel);
|
||||
const setCurrentVoiceChannel = useVoiceStore((s) => s.setCurrentVoiceChannel);
|
||||
|
||||
const pushMobileScreen = useUIStore((s) => s.pushMobileScreen);
|
||||
const setMobileTab = useUIStore((s) => s.setMobileTab);
|
||||
@@ -52,7 +52,7 @@ export function MobileSpacesScreen() {
|
||||
|
||||
// Auto-select first space if none selected
|
||||
useEffect(() => {
|
||||
if (!selectedSpaceId && spaces.length > 0) {
|
||||
if (!selectedSpaceId && spaces.length > 0 && spaces[0]) {
|
||||
setSelectedSpaceId(spaces[0].id);
|
||||
}
|
||||
}, [selectedSpaceId, spaces]);
|
||||
@@ -107,7 +107,7 @@ export function MobileSpacesScreen() {
|
||||
|
||||
const handleChannelTap = (channel: Channel) => {
|
||||
if (channel.type === 'voice') {
|
||||
joinChannel(channel.id);
|
||||
setCurrentVoiceChannel(channel.id);
|
||||
return;
|
||||
}
|
||||
if (selectedSpaceId) {
|
||||
|
||||
Reference in New Issue
Block a user