diff --git a/src/app/[locale]/(auth)/dashboard/garden/page.tsx b/src/app/[locale]/(auth)/dashboard/garden/page.tsx index d4f97a7..e269d9d 100644 --- a/src/app/[locale]/(auth)/dashboard/garden/page.tsx +++ b/src/app/[locale]/(auth)/dashboard/garden/page.tsx @@ -7,8 +7,8 @@ import Link from 'next/link'; import { useSearchParams } from 'next/navigation'; import { useCallback, useEffect, useState } from 'react'; import Calendar from 'react-calendar'; -import ScrollToTop from 'react-scroll-to-top'; +// import ScrollToTop from 'react-scroll-to-top'; import { addToCollection, splitIntoWords } from '@/helpers/functions'; const GardenDaily = () => { @@ -236,7 +236,7 @@ const GardenDaily = () => { ))} - + {/* */} ); }; diff --git a/src/app/[locale]/(auth)/dashboard/layout.tsx b/src/app/[locale]/(auth)/dashboard/layout.tsx index 1e789cf..9810009 100644 --- a/src/app/[locale]/(auth)/dashboard/layout.tsx +++ b/src/app/[locale]/(auth)/dashboard/layout.tsx @@ -8,6 +8,7 @@ import Modal from 'react-modal'; import LocaleSwitcher from '@/components/LocaleSwitcher'; import { LogOutButton } from '@/components/LogOutButton'; +import SpeedDial from '@/components/SpeedDial'; import Uploader from '@/components/Uploader'; import { BaseTemplate } from '@/templates/BaseTemplate'; @@ -21,6 +22,8 @@ export default function DashboardLayout(props: { children: React.ReactNode }) { const closeModal = () => setModalOpen(false); + const handleOpenModal = () => setModalOpen(true); + const afterOpenModal = () => { // focus on the textarea const message = document.getElementById('modal-message'); @@ -172,6 +175,7 @@ export default function DashboardLayout(props: { children: React.ReactNode }) { */} + {props.children} ); diff --git a/src/components/SpeedDial.tsx b/src/components/SpeedDial.tsx new file mode 100644 index 0000000..12b6baa --- /dev/null +++ b/src/components/SpeedDial.tsx @@ -0,0 +1,121 @@ +import { useState } from 'react'; + +const SpeedDial = ({ onOpenModal }) => { + const [isOpen, setIsOpen] = useState(false); + + const toggleMenu = () => { + setIsOpen(!isOpen); + }; + + return ( +
+
+ {/* + + */} + +
+ +
+ ); +}; + +export default SpeedDial;