From 8fe6aae5eeb98f9f7f9dfa8b23a1d94d43097c16 Mon Sep 17 00:00:00 2001 From: John-George Sample Date: Sun, 8 Dec 2024 12:51:46 -0500 Subject: [PATCH 1/4] start ATL dialog --- app/components/AddToListDialog.tsx | 62 ++++++++++++++++++++++++++++++ app/components/PanelContent.tsx | 14 +++++-- 2 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 app/components/AddToListDialog.tsx diff --git a/app/components/AddToListDialog.tsx b/app/components/AddToListDialog.tsx new file mode 100644 index 0000000..22c2757 --- /dev/null +++ b/app/components/AddToListDialog.tsx @@ -0,0 +1,62 @@ +'use client' + +import { useEffect, useState } from 'react' +import { Dialog, DialogBackdrop, DialogPanel, DialogTitle } from '@headlessui/react' + +interface IProps { + handleClose: () => void + isOpen: boolean +} + +export default function AddToListDialog(props: IProps) { + + const handleSave = () => { + props.handleClose() + } + + return ( + + + +
+
+ +
+
+
+ Add to list + {/* @TODO iterate lists here */} +
+

Used to show how close nearby shops are.

+
+
+
+
+
+ + +
+
+
+
+
+ ) +} diff --git a/app/components/PanelContent.tsx b/app/components/PanelContent.tsx index 851c484..498b700 100644 --- a/app/components/PanelContent.tsx +++ b/app/components/PanelContent.tsx @@ -1,6 +1,6 @@ 'use client' -import { ArrowTopRightOnSquareIcon } from '@heroicons/react/24/outline' +import { ArrowTopRightOnSquareIcon, BookmarkIcon, PlusIcon } from '@heroicons/react/24/outline' import { TShop } from '@/types/shop-types' import { TNeighborhood } from '@/types/neighborhood-types' import NearbyShops from './NearbyShops' @@ -26,9 +26,15 @@ export default function PanelContent(props: IProps) { )}
{props.shop.properties.address}
-

- {props.shop.properties.neighborhood} -

+

{props.shop.properties.neighborhood}

+
+
+ +
+
+ +
+
From 81344849c8ccf39067d73ec1f4ebf757882c6e89 Mon Sep 17 00:00:00 2001 From: John-George Sample Date: Sun, 8 Dec 2024 13:15:48 -0500 Subject: [PATCH 2/4] open atl dialog on click --- app/components/PanelContent.tsx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/app/components/PanelContent.tsx b/app/components/PanelContent.tsx index 498b700..82b0318 100644 --- a/app/components/PanelContent.tsx +++ b/app/components/PanelContent.tsx @@ -1,9 +1,11 @@ 'use client' +import { useState } from 'react' import { ArrowTopRightOnSquareIcon, BookmarkIcon, PlusIcon } from '@heroicons/react/24/outline' import { TShop } from '@/types/shop-types' import { TNeighborhood } from '@/types/neighborhood-types' import NearbyShops from './NearbyShops' +import AddToListDialog from './AddToListDialog' interface IProps { handleNearbyShopClick: (shop: TShop) => void @@ -12,6 +14,7 @@ interface IProps { // @TODO PanelBody might be a better name? export default function PanelContent(props: IProps) { + const [addToListDialogIsOpen, setAddToListDialogIsOpen] = useState(false) return ( <>
@@ -27,16 +30,18 @@ export default function PanelContent(props: IProps) { )}
{props.shop.properties.address}

{props.shop.properties.neighborhood}

-
-
- -
-
+
+
setAddToListDialogIsOpen(true)} + >
+ + setAddToListDialogIsOpen(false)} /> ) } From 4d4f7c23fb590c04a69b46925350b0ef5fb42fc2 Mon Sep 17 00:00:00 2001 From: John-George Sample Date: Sun, 8 Dec 2024 13:16:07 -0500 Subject: [PATCH 3/4] start mocking layout --- app/components/AddToListDialog.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/components/AddToListDialog.tsx b/app/components/AddToListDialog.tsx index 22c2757..75354f9 100644 --- a/app/components/AddToListDialog.tsx +++ b/app/components/AddToListDialog.tsx @@ -33,8 +33,20 @@ export default function AddToListDialog(props: IProps) { Add to list {/* @TODO iterate lists here */}
-

Used to show how close nearby shops are.

+
    +
  • + +
  • +
  • + +
  • +
+
From 577a0ca797946d046d63764ebcb1f911cffb57b2 Mon Sep 17 00:00:00 2001 From: John-George Sample Date: Sun, 8 Dec 2024 13:49:39 -0500 Subject: [PATCH 4/4] start ATL dropdown --- app/components/AddToListDialog.tsx | 7 ------ app/components/AddToListDropdown.tsx | 34 ++++++++++++++++++++++++++++ app/components/PanelContent.tsx | 10 +++----- 3 files changed, 37 insertions(+), 14 deletions(-) create mode 100644 app/components/AddToListDropdown.tsx diff --git a/app/components/AddToListDialog.tsx b/app/components/AddToListDialog.tsx index 75354f9..f676936 100644 --- a/app/components/AddToListDialog.tsx +++ b/app/components/AddToListDialog.tsx @@ -51,13 +51,6 @@ export default function AddToListDialog(props: IProps) {
- + + + + + + + ) +} diff --git a/app/components/PanelContent.tsx b/app/components/PanelContent.tsx index 82b0318..5770bc7 100644 --- a/app/components/PanelContent.tsx +++ b/app/components/PanelContent.tsx @@ -6,6 +6,7 @@ import { TShop } from '@/types/shop-types' import { TNeighborhood } from '@/types/neighborhood-types' import NearbyShops from './NearbyShops' import AddToListDialog from './AddToListDialog' +import AddToListDropdown from './AddToListDropdown' interface IProps { handleNearbyShopClick: (shop: TShop) => void @@ -31,17 +32,12 @@ export default function PanelContent(props: IProps) {
{props.shop.properties.address}

{props.shop.properties.neighborhood}

-
setAddToListDialogIsOpen(true)} - > - -
+
- setAddToListDialogIsOpen(false)} /> + {/* setAddToListDialogIsOpen(false)} /> */} ) }