Skip to content

Commit

Permalink
🔧 update: menu-options, add CustomModal provider and subaccountDetails.
Browse files Browse the repository at this point in the history
  • Loading branch information
yashdev9274 committed Jun 16, 2024
1 parent 74268f3 commit fc82391
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/components/sidebar/menu-options.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
import Link from 'next/link'
import CustomModal from '../global/custom-modal'
import { useModal } from '@/providers/modal-provider'
import SubAccountDetails from '../forms/subaccount-details'


type Props = {
Expand Down Expand Up @@ -234,7 +235,20 @@ const MenuOptions = ({
<SheetClose>
<Button
className="w-full flex gap-2"
onClick={() => { }}
onClick={() => {
setOpen(
<CustomModal
title="Create A Subaccount"
subheading="You can switch between your agency account and the subaccount from the sidebar"
>
<SubAccountDetails
agencyDetails={user?.Agency as Agency}
userId={user?.id as string}
userName={user?.name}
/>
</CustomModal>
)
}}
>
<PlusCircleIcon size={15} />
Create Sub Account
Expand Down

0 comments on commit fc82391

Please sign in to comment.