diff --git a/client/app/navigation/AppNavigator.tsx b/client/app/navigation/AppNavigator.tsx index fe52e176c..085e6c3da 100644 --- a/client/app/navigation/AppNavigator.tsx +++ b/client/app/navigation/AppNavigator.tsx @@ -1,4 +1,5 @@ import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"; +import {StyleSheet, Text, View} from 'react-native'; import * as React from "react"; import { LocationProvider } from "../contexts/LocationContext"; @@ -6,9 +7,10 @@ import { SocketProvider } from "../contexts/SocketContext"; import { UserProvider } from "../contexts/UserContext"; import ChatScreen from "../screens/chat/ChatScreen"; import SettingsScreen from "../screens/settings/SettingsScreen"; +import { Home } from "react-native-feather"; +import {User} from "react-native-feather"; const Tab = createBottomTabNavigator(); - const AppNavigator = () => { return ( @@ -17,9 +19,24 @@ const AppNavigator = () => { - - + { + return( + ) + } + } + }/> + { + return() + } + } + } + /> diff --git a/server/src/index.ts b/server/src/index.ts index 4570e63d5..82e1abae0 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -63,11 +63,6 @@ io.on("connection", async (socket: any) => { const defaultConnectedUser: ConnectedUser = { uid: "UID", socketId: socket.id, - displayName: "DISPLAY NAME", - userIcon: { - foregroundImage: "FOREGROUND IMG", - backgroundImage: "BACKGROUND IMG", - }, location: { lat: 9999, lon: 9999, diff --git a/server/src/routes/user/create.ts b/server/src/routes/user/create.ts index 140ae0713..2538c4604 100644 --- a/server/src/routes/user/create.ts +++ b/server/src/routes/user/create.ts @@ -9,11 +9,6 @@ createUserRoute.post("/users", async (req, res) => { status = await createUser({ uid: req.body.uid, socketId: req.body.socketId, - displayName: req.body.displayName, - userIcon: { - foregroundImage: req.body.userIcon.foregroundImage, - backgroundImage: req.body.userIcon.backgroundImage, - }, location: { lat: Number(req.body.location.lat), lon: Number(req.body.location.lon), diff --git a/server/src/routes/user/delete.ts b/server/src/routes/user/delete.ts index f692d6569..c5ba6643d 100644 --- a/server/src/routes/user/delete.ts +++ b/server/src/routes/user/delete.ts @@ -3,7 +3,7 @@ import { deleteConnectedUserByUID } from "../../actions/deleteConnectedUser"; const deleteUserRoute = Router(); -deleteUserRoute.post("/users", async (req, res) => { +deleteUserRoute.delete("/users", async (req, res) => { const userId = req.query.userId; if (typeof userId != "string") { console.error( diff --git a/server/src/types/User.ts b/server/src/types/User.ts index e404eab77..312b1da2f 100644 --- a/server/src/types/User.ts +++ b/server/src/types/User.ts @@ -11,19 +11,19 @@ export interface UserConfig { isPermaBanned: boolean reason: string } + displayName: string + userIcon?: { + foregroundImage: string + backgroundImage: string + } } export interface ConnectedUser { uid: string socketId: string - displayName: string - userIcon?: { - foregroundImage: string - backgroundImage: string - } location: { lat: number lon: number geohash: string - } + }, }