diff --git a/src/components/Modals/ConnectModal.tsx b/src/components/Modals/ConnectModal.tsx index 241876d..b46e989 100644 --- a/src/components/Modals/ConnectModal.tsx +++ b/src/components/Modals/ConnectModal.tsx @@ -170,7 +170,7 @@ const ConnectModal = (props: ConnectModalProps): JSX.Element => { />
- {props.otherUser.startPOILocation} + {props.otherUser.startAddress}
diff --git a/src/components/UserCards/UserCard.tsx b/src/components/UserCards/UserCard.tsx index 6854754..5197f95 100644 --- a/src/components/UserCards/UserCard.tsx +++ b/src/components/UserCards/UserCard.tsx @@ -161,7 +161,7 @@ export const UserCard = (props: UserCardProps): JSX.Element => {- {props.otherUser.startPOILocation} + {props.otherUser.startAddress}
diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 1427ab6..cbd8c96 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -15,13 +15,13 @@ import { UserContext } from "../utils/userContext"; import _, { debounce } from "lodash"; import { SidebarPage } from "../components/Sidebar/Sidebar"; import { - CarpoolAddress, - CarpoolFeature, - EnhancedPublicUser, - FiltersState, - GeoJsonUsers, - PublicUser, - Request, + CarpoolAddress, + CarpoolFeature, + EnhancedPublicUser, + FiltersState, + GeoJsonUsers, + PublicUser, + Request, } from "../utils/types"; import { Role, User } from "@prisma/client"; import { useGetDirections, viewRoute } from "../utils/map/viewRoute"; @@ -42,610 +42,526 @@ import updateGeoJsonUsers from "../utils/map/updateGeoJsonUsers"; mapboxgl.accessToken = browserEnv.NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN; export async function getServerSideProps(context: GetServerSidePropsContext) { - const session = await getSession(context); + const session = await getSession(context); + + if (!session?.user) { + return { + redirect: { + destination: "/sign-in", + permanent: false, + }, + }; + } + if (!session.user.isOnboarded) { + return { + redirect: { + destination: "/profile/setup", + permanent: false, + }, + }; + } - if (!session?.user) { - return { - redirect: { - destination: "/sign-in", - permanent: false, - }, - }; - } - if (!session.user.isOnboarded) { return { - redirect: { - destination: "/profile/setup", - permanent: false, - }, + props: {}, }; - } - - return { - props: {}, - }; } const Home: NextPage