diff --git a/src/app/dashboard/dashLayout.tsx b/src/app/dashboard/dashLayout.tsx index ed12bf1..86874f7 100644 --- a/src/app/dashboard/dashLayout.tsx +++ b/src/app/dashboard/dashLayout.tsx @@ -8,7 +8,7 @@ import imageDecenterLogoSubtitle from '@public/Logo Texts.png' import { RxDashboard } from 'react-icons/rx' import { HiOutlineChip } from 'react-icons/hi' -import { BsDatabase } from 'react-icons/bs' +import { BsDatabase, BsGear } from 'react-icons/bs' import { GoBell, GoSearch } from 'react-icons/go' import { AiFillSetting } from 'react-icons/ai' import { CiLogout } from 'react-icons/ci' @@ -84,9 +84,8 @@ export const DashLayout = ({ children }: { children: React.ReactNode }) => {
@@ -96,9 +95,8 @@ export const DashLayout = ({ children }: { children: React.ReactNode }) => {
@@ -108,9 +106,8 @@ export const DashLayout = ({ children }: { children: React.ReactNode }) => {
@@ -138,12 +135,11 @@ export const DashLayout = ({ children }: { children: React.ReactNode }) => {
*/}
- +

Settings

diff --git a/src/app/explore/welcome/page.tsx b/src/app/explore/welcome/page.tsx index 4f7a1fa..6b3e298 100644 --- a/src/app/explore/welcome/page.tsx +++ b/src/app/explore/welcome/page.tsx @@ -16,7 +16,7 @@ export default function Page() { const { push } = useRouter() const userStore = useUserStore() const [selectedImage, setSelectedImage] = useState(null); - const fileInputRef = useRef(null); + const fileInputRef = useRef(null); const [firstName, setFirstName] = useState(''); const [lastName, setLastName] = useState(''); const [username, setUsername] = useState('') @@ -50,39 +50,39 @@ export default function Page() { }; const areAllFieldsFilled = () => { - return firstName && lastName && username && email && bio; + return firstName && lastName && username && email; }; const handleFileInputChange = async (event) => { - + const selectedFile = event.target.files[0]; console.log(selectedFile) if (selectedFile) { try { - // Convert the selected file to a data URL - const dataUrl = await readFileAsDataURL(selectedFile); + // Convert the selected file to a data URL + const dataUrl = await readFileAsDataURL(selectedFile); - // console.log("Data URL: " + dataUrl) + // console.log("Data URL: " + dataUrl) - // Ensure dataUrl is a string before updating userStore - if (typeof dataUrl === 'string') { - // Update the userStore with the data URL - userStore.setUser({ - profileImage: dataUrl, - }); + // Ensure dataUrl is a string before updating userStore + if (typeof dataUrl === 'string') { + // Update the userStore with the data URL + userStore.setUser({ + profileImage: dataUrl, + }); - // Update the src prop of the Image component - setSelectedImage(selectedFile); - } else { - console.error('Error converting file to data URL. Invalid data URL format.'); - } + // Update the src prop of the Image component + setSelectedImage(selectedFile); + } else { + console.error('Error converting file to data URL. Invalid data URL format.'); + } } catch (error) { - console.error('Error converting file to data URL:', error); + console.error('Error converting file to data URL:', error); } } }; @@ -91,20 +91,20 @@ export default function Page() { // Helper function to read file as data URL const readFileAsDataURL = (file) => { return new Promise((resolve, reject) => { - const reader = new FileReader(); - - reader.onloadend = () => { - resolve(reader.result); - }; - - reader.onerror = (error) => { - reject(error); - }; - - reader.readAsDataURL(file); + const reader = new FileReader(); + + reader.onloadend = () => { + resolve(reader.result); + }; + + reader.onerror = (error) => { + reject(error); + }; + + reader.readAsDataURL(file); }); }; - + type Url = { url: string @@ -144,7 +144,7 @@ export default function Page() { return ( -
+

{' '} @@ -159,20 +159,20 @@ export default function Page() { />

-
+
{/*FIXME: keep firstName and last name ; .*/}