generated from taylorbryant/gatsby-starter-tailwind
-
-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
viet nguyen
committed
Nov 26, 2023
1 parent
cd06997
commit 1f9087a
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
) | ||
} |