Skip to content

Commit

Permalink
Merge branch 'main' of github.com:lukas-holzner/codefusion-hackathon
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert committed Oct 1, 2024
2 parents c8beb35 + 1d4fece commit affa731
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions frontend/src/container/AgendaList/AgendaList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default function AgendaList() {
});

useEffect(() => {
if(agendaItems.meeting_agenda.length === 0) {
if(agendaItems && agendaItems.meeting_agenda.length === 0) {
navigate(`/meeting/${id}`);
}
}, [agendaItems]);
Expand Down Expand Up @@ -119,7 +119,7 @@ export default function AgendaList() {
{(provided) => (
<Paper elevation={3}>
<List {...provided.droppableProps} ref={provided.innerRef}>
{agendaItems.meeting_agenda && agendaItems.meeting_agenda.map((item, index) => (
{agendaItems && agendaItems.meeting_agenda.map((item, index) => (
<Draggable key={`${index}-${item.agenda_item}`} draggableId={`${index}-${item.agenda_item}`} index={index}>
{(provided, snapshot) => (
<ListItem
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/container/Meeting/Meeting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ export const Meeting: React.FC = () => {
const mutation = useMutation({
mutationFn: sendMessage,
onSuccess: (data) => {
setMessages(() => data.chat_messages);
setAgendaItems(data.agenda_items);
queryClient.invalidateQueries(['conversation', meetingId, userId]);

if (data.finished) {
navigate(`/meeting/${meetingId}/agenda`);
Expand Down

0 comments on commit affa731

Please sign in to comment.