@@ -108,9 +106,8 @@ export const DashLayout = ({ children }: { children: React.ReactNode }) => {
@@ -138,12 +135,11 @@ export const DashLayout = ({ children }: { children: React.ReactNode }) => {
*/}
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 (
-