diff --git a/src/components/chat/ChatListItem.tsx b/src/components/chat/ChatListItem.tsx index 319693c..a739a5d 100644 --- a/src/components/chat/ChatListItem.tsx +++ b/src/components/chat/ChatListItem.tsx @@ -1,5 +1,5 @@ import {Chat, User} from '@prisma/client'; -import {Box, Button, Flex, Image, Text} from '@chakra-ui/react'; +import {Avatar, Box, Flex, Text} from '@chakra-ui/react'; import {useRouter} from 'next/router'; type Props = { @@ -11,11 +11,9 @@ export default function ChatListItem({user, chat}: Props) { const router = useRouter(); const otherUser = chat.User.find((u: User) => u.id !== user.id) as User; - console.log(chat); - return ( router.push(`/chat/${chat.id}`)}> - + {otherUser.firstName} {otherUser.lastName} diff --git a/src/components/chat/MapBar.tsx b/src/components/chat/MapBar.tsx index 3919338..61f7c3f 100644 --- a/src/components/chat/MapBar.tsx +++ b/src/components/chat/MapBar.tsx @@ -1,7 +1,6 @@ import { Flex } from "@chakra-ui/react"; -import { MapContainer, Marker, TileLayer } from "react-leaflet"; +import { MapContainer, TileLayer } from "react-leaflet"; import SimpleMarkerBar from "./SimpleMarkerBar"; -import MarkerClusterGroup from "@christopherpickering/react-leaflet-markercluster"; import "leaflet/dist/leaflet.css"; type MapBarProps = { @@ -19,7 +18,7 @@ export default function MapBar({ lat, lon, name, align }: MapBarProps) { zoom={13} minZoom={6} zoomControl={false} - style={{ width: "50%", height: "20rem" }} + style={{ width: "100%", height: "20rem" }} > import("./MapBar"), { +const MapBarWithNoSSR = dynamic(() => import('./MapBar'), { ssr: false, }); type Props = { - align: "left" | "right"; + align: 'left' | 'right'; point: { lon: string; lat: string; @@ -15,19 +15,14 @@ type Props = { }; }; -export default function MessageMap({ align, point }: Props) { - const { lon, lat, name } = point; +export default function MessageMap({align, point}: Props) { + const {lon, lat, name} = point; return ( - - - - {lon}, {lat}, {name} - - + + + + {/*{lon}, {lat}, {name}*/} + + ); }