format codebase with prettier
This commit is contained in:
@@ -4,24 +4,30 @@ import theme from "../../Themes";
|
||||
|
||||
export default function TabLayout() {
|
||||
return (
|
||||
<Tabs screenOptions={{
|
||||
headerShown: false,
|
||||
tabBarActiveTintColor: theme.chatBot,
|
||||
tabBarInactiveTintColor: theme.primeFg,
|
||||
tabBarStyle: { backgroundColor: theme.primeBg },
|
||||
}}>
|
||||
<Tabs
|
||||
screenOptions={{
|
||||
headerShown: false,
|
||||
tabBarActiveTintColor: theme.chatBot,
|
||||
tabBarInactiveTintColor: theme.primeFg,
|
||||
tabBarStyle: { backgroundColor: theme.primeBg },
|
||||
}}
|
||||
>
|
||||
<Tabs.Screen
|
||||
name="chat"
|
||||
options={{
|
||||
title: 'Chat',
|
||||
tabBarIcon: ({ color }) => <Ionicons size={28} name="chatbubble" color={color} />,
|
||||
title: "Chat",
|
||||
tabBarIcon: ({ color }) => (
|
||||
<Ionicons size={28} name="chatbubble" color={color} />
|
||||
),
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="calendar"
|
||||
options={{
|
||||
title: 'Calendar',
|
||||
tabBarIcon: ({ color }) => <Ionicons size={28} name="calendar" color={color} />,
|
||||
title: "Calendar",
|
||||
tabBarIcon: ({ color }) => (
|
||||
<Ionicons size={28} name="calendar" color={color} />
|
||||
),
|
||||
}}
|
||||
/>
|
||||
</Tabs>
|
||||
|
||||
@@ -40,13 +40,13 @@ const Chat = () => {
|
||||
action: "confirm" | "reject",
|
||||
messageId: string,
|
||||
conversationId: string,
|
||||
proposedChange?: ProposedEventChange
|
||||
proposedChange?: ProposedEventChange,
|
||||
) => {
|
||||
// Mark message as responded (optimistic update)
|
||||
setMessages((prev) =>
|
||||
prev.map((msg) =>
|
||||
msg.id === messageId ? { ...msg, respondedAction: action } : msg
|
||||
)
|
||||
msg.id === messageId ? { ...msg, respondedAction: action } : msg,
|
||||
),
|
||||
);
|
||||
|
||||
try {
|
||||
@@ -58,7 +58,7 @@ const Chat = () => {
|
||||
proposedChange.action,
|
||||
proposedChange.event,
|
||||
proposedChange.eventId,
|
||||
proposedChange.updates
|
||||
proposedChange.updates,
|
||||
)
|
||||
: await ChatService.rejectEvent(conversationId, messageId);
|
||||
|
||||
@@ -74,8 +74,8 @@ const Chat = () => {
|
||||
// Revert on error
|
||||
setMessages((prev) =>
|
||||
prev.map((msg) =>
|
||||
msg.id === messageId ? { ...msg, respondedAction: undefined } : msg
|
||||
)
|
||||
msg.id === messageId ? { ...msg, respondedAction: undefined } : msg,
|
||||
),
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -119,7 +119,12 @@ const Chat = () => {
|
||||
proposedChange={item.proposedChange}
|
||||
respondedAction={item.respondedAction}
|
||||
onConfirm={() =>
|
||||
handleEventResponse("confirm", item.id, item.conversationId!, item.proposedChange)
|
||||
handleEventResponse(
|
||||
"confirm",
|
||||
item.id,
|
||||
item.conversationId!,
|
||||
item.proposedChange,
|
||||
)
|
||||
}
|
||||
onReject={() =>
|
||||
handleEventResponse("reject", item.id, item.conversationId!)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { View, Text, TextInput, Pressable } from 'react-native';
|
||||
import { useLocalSearchParams } from 'expo-router';
|
||||
import BaseBackground from '../../components/BaseBackground';
|
||||
import { View, Text, TextInput, Pressable } from "react-native";
|
||||
import { useLocalSearchParams } from "expo-router";
|
||||
import BaseBackground from "../../components/BaseBackground";
|
||||
|
||||
const EventDetailScreen = () => {
|
||||
const { id } = useLocalSearchParams<{ id: string }>();
|
||||
@@ -12,7 +12,7 @@ const EventDetailScreen = () => {
|
||||
// TODO: Delete button -> EventService.delete()
|
||||
// TODO: Link to NoteScreen for this event
|
||||
// TODO: Loading and error states
|
||||
throw new Error('Not implemented');
|
||||
throw new Error("Not implemented");
|
||||
|
||||
return (
|
||||
<BaseBackground>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { View, Text, TextInput, Pressable } from 'react-native';
|
||||
import BaseBackground from '../components/BaseBackground';
|
||||
import { View, Text, TextInput, Pressable } from "react-native";
|
||||
import BaseBackground from "../components/BaseBackground";
|
||||
|
||||
const LoginScreen = () => {
|
||||
// TODO: Email input field
|
||||
@@ -8,7 +8,7 @@ const LoginScreen = () => {
|
||||
// TODO: Link to RegisterScreen
|
||||
// TODO: Error handling and display
|
||||
// TODO: Navigate to Calendar on success
|
||||
throw new Error('Not implemented');
|
||||
throw new Error("Not implemented");
|
||||
|
||||
return (
|
||||
<BaseBackground>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { View, Text, TextInput, Pressable } from 'react-native';
|
||||
import { useLocalSearchParams } from 'expo-router';
|
||||
import BaseBackground from '../../components/BaseBackground';
|
||||
import { View, Text, TextInput, Pressable } from "react-native";
|
||||
import { useLocalSearchParams } from "expo-router";
|
||||
import BaseBackground from "../../components/BaseBackground";
|
||||
|
||||
const NoteScreen = () => {
|
||||
const { id } = useLocalSearchParams<{ id: string }>();
|
||||
@@ -10,7 +10,7 @@ const NoteScreen = () => {
|
||||
// TODO: Auto-save or manual save button
|
||||
// TODO: Save changes -> EventService.update({ note: ... })
|
||||
// TODO: Loading and error states
|
||||
throw new Error('Not implemented');
|
||||
throw new Error("Not implemented");
|
||||
|
||||
return (
|
||||
<BaseBackground>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { View, Text, TextInput, Pressable } from 'react-native';
|
||||
import BaseBackground from '../components/BaseBackground';
|
||||
import { View, Text, TextInput, Pressable } from "react-native";
|
||||
import BaseBackground from "../components/BaseBackground";
|
||||
|
||||
const RegisterScreen = () => {
|
||||
// TODO: Email input field
|
||||
@@ -10,7 +10,7 @@ const RegisterScreen = () => {
|
||||
// TODO: Link to LoginScreen
|
||||
// TODO: Error handling and display
|
||||
// TODO: Navigate to Calendar on success
|
||||
throw new Error('Not implemented');
|
||||
throw new Error("Not implemented");
|
||||
|
||||
return (
|
||||
<BaseBackground>
|
||||
|
||||
Reference in New Issue
Block a user