Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into dev
  • Loading branch information
mikedegeofroy committed Nov 2, 2024
2 parents b125c47 + 441b8fb commit fe25753
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 18 deletions.
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@
"clsx": "^2.1.1",
"framer-motion": "^11.2.4",
"jest-environment-jsdom": "^29.7.0",
"leaflet": "^1.9.4",
"lucide-react": "^0.378.0",
"postcss": "^8.4.38",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-helmet": "^6.1.0",
"react-hot-toast": "^2.4.1",
"react-leaflet": "^4.2.1",
"react-router-dom": "^6.23.1",
"shamps-tunnel": "^1.0.0",
"socket.io": "1.4.5",
Expand All @@ -46,12 +48,14 @@
"@eslint/js": "^9.9.1",
"@testing-library/react-hooks": "^8.0.1",
"@types/jest": "^29.5.12",
"@types/leaflet": "^1.9.14",
"@types/react": "18.2.42",
"@types/react-dom": "^18.2.22",
"@types/react-router-dom": "^5.3.3",
"@typescript-eslint/eslint-plugin": "^7.9.0",
"@typescript-eslint/parser": "^7.9.0",
"@vitejs/plugin-react": "^4.2.1",
"add": "^2.0.6",
"eslint": "^9.9.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
Expand All @@ -66,7 +70,8 @@
"ts-node": "^10.9.2",
"typescript": "^5.2.2",
"typescript-eslint": "^8.2.0",
"vite": "^5.2.0"
"vite": "^5.2.0",
"yarn": "^1.22.22"
},
"resolutions": {
"@types/react": "18.2.42"
Expand Down
5 changes: 5 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
@tailwind components;
@tailwind utilities;

.leaflet-container {
height: 100%;
width: 100%;
}

@layer base {
:root {
--background: hsl(0 0% 100%);
Expand Down
36 changes: 19 additions & 17 deletions src/shared/api/lobby.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,28 @@ import { API_URL } from '../constants';
import { Location } from '../types/location.interface';

interface Lobby {
id: string;
location: Location;
id: string;
location: Location;
}

export const fetchLobby = async (id: string): Promise<Lobby | undefined> => {
try {
const response = await axios.get<Lobby>(`${API_URL}/api/v1/lobbies/${id}`);
return response.data;
} catch (err) {
console.error('Error fetching tags:', err);
return undefined;
}
try {
const response = await axios.get<Lobby>(`${API_URL}/api/v1/lobbies/${id}`);
return response.data;
} catch (err) {
console.error('Error fetching tags:', err);
return undefined;
}
};

export const postLobby = async (id: string): Promise<Lobby | undefined> => {
try {
const response = await axios.get<Lobby>(`${API_URL}/api/v1/lobbies/${id}`);
return response.data;
} catch (err) {
console.error('Error fetching tags:', err);
return undefined;
}
export const postLobby = async (location: Location): Promise<Lobby | undefined> => {
try {
const response = await axios.post<Lobby>(`${API_URL}/api/v1/lobbies`, {
location
});
return response.data;
} catch (err) {
console.error('Error fetching tags:', err);
return undefined;
}
};
39 changes: 39 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1214,6 +1214,11 @@
"@babel/runtime" "^7.13.10"
"@radix-ui/react-use-layout-effect" "1.0.1"

"@react-leaflet/core@^2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@react-leaflet/core/-/core-2.1.0.tgz#383acd31259d7c9ae8fb1b02d5e18fe613c2a13d"
integrity sha512-Qk7Pfu8BSarKGqILj4x7bCSZ1pjuAPZ+qmRwH5S7mDS91VSbVVsJSrW4qA+GPrro8t69gFYVMWb1Zc4yFmPiVg==

"@remix-run/[email protected]":
version "1.16.1"
resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.16.1.tgz#73db3c48b975eeb06d0006481bde4f5f2d17d1cd"
Expand Down Expand Up @@ -1401,6 +1406,11 @@
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4"
integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==

"@types/geojson@*":
version "7946.0.14"
resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.14.tgz#319b63ad6df705ee2a65a73ef042c8271e696613"
integrity sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==

"@types/graceful-fs@^4.1.3":
version "4.1.9"
resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4"
Expand Down Expand Up @@ -1449,6 +1459,13 @@
"@types/tough-cookie" "*"
parse5 "^7.0.0"

"@types/leaflet@^1.9.14":
version "1.9.14"
resolved "https://registry.yarnpkg.com/@types/leaflet/-/leaflet-1.9.14.tgz#f008fef281a05e457bbae9f00a82c836af1b9b03"
integrity sha512-sx2q6MDJaajwhKeVgPSvqXd8rhNJSTA3tMidQGduZn9S6WBYxDkCpSpV5xXEmSg7Cgdk/5vJGhVF1kMYLzauBg==
dependencies:
"@types/geojson" "*"

"@types/mute-stream@^0.0.4":
version "0.0.4"
resolved "https://registry.yarnpkg.com/@types/mute-stream/-/mute-stream-0.0.4.tgz#77208e56a08767af6c5e1237be8888e2f255c478"
Expand Down Expand Up @@ -1771,6 +1788,11 @@ acorn@^8.11.3:
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a"
integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==

add@^2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/add/-/add-2.0.6.tgz#248f0a9f6e5a528ef2295dbeec30532130ae2235"
integrity sha512-j5QzrmsokwWWp6kUcJQySpbG+xfOBqqKnup3OIk1pz+kB/80SLorZ9V8zHFLO92Lcd+hbvq8bT+zOGoPkmBV0Q==

[email protected]:
version "0.8.1"
resolved "https://registry.yarnpkg.com/after/-/after-0.8.1.tgz#ab5d4fb883f596816d3515f8f791c0af486dd627"
Expand Down Expand Up @@ -4398,6 +4420,11 @@ kleur@^3.0.3:
resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e"
integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==

leaflet@^1.9.4:
version "1.9.4"
resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.9.4.tgz#23fae724e282fa25745aff82ca4d394748db7d8d"
integrity sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==

leven@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2"
Expand Down Expand Up @@ -5124,6 +5151,13 @@ react-is@^18.0.0:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e"
integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==

react-leaflet@^4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/react-leaflet/-/react-leaflet-4.2.1.tgz#c300e9eccaf15cb40757552e181200aa10b94780"
integrity sha512-p9chkvhcKrWn/H/1FFeVSqLdReGwn2qmiobOQGO3BifX+/vV/39qhY8dGqbdcPh1e6jxh/QHriLXr7a4eLFK4Q==
dependencies:
"@react-leaflet/core" "^2.1.0"

react-refresh@^0.14.0:
version "0.14.2"
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.2.tgz#3833da01ce32da470f1f936b9d477da5c7028bf9"
Expand Down Expand Up @@ -6316,6 +6350,11 @@ yargs@^17.3.1, yargs@^17.7.2:
y18n "^5.0.5"
yargs-parser "^21.1.1"

yarn@^1.22.22:
version "1.22.22"
resolved "https://registry.yarnpkg.com/yarn/-/yarn-1.22.22.tgz#ac34549e6aa8e7ead463a7407e1c7390f61a6610"
integrity sha512-prL3kGtyG7o9Z9Sv8IPfBNrWTDmXB4Qbes8A9rEzt6wkJV8mUvoirjU0Mp3GGAU06Y0XQyA3/2/RQFVuK7MTfg==

[email protected]:
version "0.1.2"
resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419"
Expand Down

0 comments on commit fe25753

Please sign in to comment.