Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into 126-reporting-frontend
  • Loading branch information
SaraKalcic committed Jun 9, 2024
2 parents 5875f2a + e2ea0ff commit 9fd42f5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
5 changes: 1 addition & 4 deletions frontend/src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ const Navbar: React.FunctionComponent = () => {
const user = useCurrentUserContext();

return (
<nav
style={{ zIndex: 1000 }}
className="flex items-center justify-between sticky top-0 sm:mb-4 px-5 py-6 w-full border-b border-gray-300 dark:border-gray-700 sm:mb-8d dark:bg-[#1e1e1e] bg-white"
>
<nav className="flex items-center justify-between sticky top-0 sm:mb-4 px-5 py-6 w-full border-b border-gray-300 dark:border-gray-700 sm:mb-8d dark:bg-[#1e1e1e] bg-white">
<div>
<RiMatchLogo />
</div>
Expand Down
20 changes: 20 additions & 0 deletions frontend/src/views/SetupPreferences/steps/Step1Preferences.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
import SimpleField from "@/components/forms/SimpleField";
import { useEffect, useState } from "react";



const Step1Preferences = () => {
const [location, setLocation] = useState("");
const getLocationFromBrowser = () => {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition((position) => {
setLocation(position.coords.latitude + ", " + position.coords.longitude);
});
} else {
console.log("Geolocation is not supported by this browser.");
}
}

useEffect(() => {
getLocationFromBrowser();
});
return (
<div className="flex flex-col gap-6 font-Montserrat">
<div className="flex flex-col gap-2">
Expand All @@ -11,11 +28,14 @@ const Step1Preferences = () => {
placeholder="091 999 999"
/>
</div>

<div className="flex flex-col gap-2">

<SimpleField
label="Where are you from?"
name="location"
placeholder="Please input your location"
value={location}
/>
</div>
<div className="flex flex-col gap-2">
Expand Down

0 comments on commit 9fd42f5

Please sign in to comment.