diff --git a/src/assets/assets.ts b/src/assets/assets.ts
index 8b1c3ad..affaecc 100644
--- a/src/assets/assets.ts
+++ b/src/assets/assets.ts
@@ -14,6 +14,8 @@ const images = {
'https://res.cloudinary.com/xbu/image/upload/v1708539494/xbu_assets/noData_gs71zg.svg',
emptyFavorites:
'https://res.cloudinary.com/xbu/image/upload/v1725365540/xbu_assets/undraw_with_love_re_1q3m_yxcely.svg',
+ collections:
+ 'https://res.cloudinary.com/xbu/image/upload/v1729604473/xbu_assets/collections_frakbc.svg',
};
export const {
@@ -25,4 +27,5 @@ export const {
PageNotFound,
NoData,
emptyFavorites,
+ collections,
} = images;
diff --git a/src/assets/collections.svg b/src/assets/collections.svg
new file mode 100644
index 0000000..dce0db6
--- /dev/null
+++ b/src/assets/collections.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/components/filters/AsideFilter.tsx b/src/components/filters/AsideFilter.tsx
index e69de29..cc13302 100644
--- a/src/components/filters/AsideFilter.tsx
+++ b/src/components/filters/AsideFilter.tsx
@@ -0,0 +1,39 @@
+import React from 'react';
+import { Flex, Icon } from '@chakra-ui/react';
+import { CgOptions } from 'react-icons/cg';
+
+export function AsideFilter() {
+ return (
+ <>
+
+
+
+ Filtrar por:
+
+
+
+ >
+ );
+}
diff --git a/src/components/forms/FormCreateUser.tsx b/src/components/forms/FormCreateUser.tsx
index 51d980a..b3e542f 100644
--- a/src/components/forms/FormCreateUser.tsx
+++ b/src/components/forms/FormCreateUser.tsx
@@ -27,7 +27,7 @@ export function FormCreateUser() {
setUsername(value);
}
- function handleSubmit(e) {
+ function handleSubmit(e: React.FormEvent) {
e.preventDefault();
mutateAsync(token);
}
@@ -38,50 +38,45 @@ export function FormCreateUser() {
return (
<>
-
-
-
- Elegir nombre de usuario
-
-
-
- xbu.com/
-
-
-
-
+
+
>
);
}
diff --git a/src/components/modals/ModalCollection.tsx b/src/components/modals/ModalCollection.tsx
new file mode 100644
index 0000000..b4ce607
--- /dev/null
+++ b/src/components/modals/ModalCollection.tsx
@@ -0,0 +1,100 @@
+import React, { useEffect, useState } from 'react';
+import { useNavigate } from 'react-router-dom';
+import {
+ Button,
+ Flex,
+ FormControl,
+ FormLabel,
+ Input,
+ Modal,
+ ModalBody,
+ ModalCloseButton,
+ ModalContent,
+ ModalHeader,
+ ModalOverlay,
+ useColorModeValue,
+} from '@chakra-ui/react';
+
+import { useCreateCollections } from '@hooks/queries';
+import { useAuth } from '@contexts/AuthContext';
+
+interface ModalCollectionType {
+ isOpen: boolean;
+ onClose: () => void;
+ refetch: () => void;
+}
+
+export function ModalCollection({ isOpen, onClose, refetch }: ModalCollectionType) {
+ const [name, setName] = useState('');
+ const bgColorBox = useColorModeValue('white', 'gray.900');
+ const bgColorInput = useColorModeValue('gray.100', 'gray.800');
+ const { currentUser } = useAuth();
+ const uid = currentUser?.uid;
+ const navigate = useNavigate();
+ const { mutate, isPending, isSuccess } = useCreateCollections(uid);
+
+ function handleNameCollection(e: React.ChangeEvent) {
+ const { value } = e.target;
+
+ setName(value);
+ }
+
+ function handleSubmit(e: React.FormEvent) {
+ e.preventDefault();
+ mutate(name);
+ }
+
+ useEffect(() => {
+ if (isSuccess) {
+ onClose();
+ refetch();
+ setName('');
+ navigate('/my-collections');
+ }
+ }, [isSuccess, navigate, onClose]);
+
+ return (
+ <>
+
+
+
+ Crear nueva colección
+
+
+
+
+
+
+ >
+ );
+}
diff --git a/src/components/nav/menu/MenuProfile.tsx b/src/components/nav/menu/MenuProfile.tsx
index 3fce03b..b4143aa 100644
--- a/src/components/nav/menu/MenuProfile.tsx
+++ b/src/components/nav/menu/MenuProfile.tsx
@@ -56,6 +56,13 @@ export function MenuProfile({ displayName, photoURL, username }: MenuType) {
+