Skip to content

Commit

Permalink
add missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
viet nguyen committed Nov 26, 2023
1 parent cd06997 commit 1f9087a
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/app/area/[...slug]/SubAreasSection.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import Link from 'next/link'
import { PlusCircle } from '@phosphor-icons/react/dist/ssr'
import { AreaList } from 'app/editArea/[slug]/general/components/AreaList'
import { AreaEntityBullet } from '@/components/cues/Entities'
import { AreaType } from '@/js/types'

/**
* Sub-areas section
*/
export const SubAreasSection: React.FC<{ area: AreaType } > = ({ area }) => {
const { uuid, children } = area
return (
<section className='w-full mt-16'>
<div className='flex items-center justify-between'>
<div className='flex items-center gap-3'>
<h3 className='flex items-center gap-4'><AreaEntityBullet />{children.length} Areas</h3>
</div>
<Link href={`/editArea/${uuid}/general#addArea`} className='btn btn-primary'>
<PlusCircle size={24} weight='duotone' /> New Areas
</Link>
</div>

<hr className='my-6 border-2 border-base-content' />

<AreaList parentUuid={uuid} areas={children} />
</section>
)
}

0 comments on commit 1f9087a

Please sign in to comment.