generated from taylorbryant/gatsby-starter-tailwind
-
-
Notifications
You must be signed in to change notification settings - Fork 127
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 19, 2023
1 parent
3ca5c48
commit 8a91296
Showing
8 changed files
with
147 additions
and
39 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
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
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 |
---|---|---|
@@ -1,31 +1,35 @@ | ||
'use client' | ||
import { AreaType } from '@/js/types' | ||
import { AreaItem } from './AreaItem' | ||
import { GluttenFreeCrumbs } from '@/components/ui/BreadCrumbs' | ||
|
||
type AreaListProps = Pick<AreaType, 'uuid' | 'areaName' | 'pathTokens' | 'ancestors'> & { | ||
areas: AreaType[] | ||
} | ||
|
||
export const AreaList: React.FC<AreaListProps> = ({ areaName, uuid, pathTokens, ancestors, areas }) => { | ||
return ( | ||
<div className='card card-compact card-bordered border-base-300/40 overflow-hidden w-full'> | ||
|
||
<div className='card card-compact card-bordered border-base-300/50 overflow-hidden w-full'> | ||
<div className='form-control'> | ||
<div className='p-6'> | ||
{/* Heading */} | ||
<label className='flex flex-col items-start justify-start gap-2 pb-2'> | ||
<div className='flex items-baseline gap-4'> | ||
<h2 className='font-semibold text-2xl'>Child areas</h2> | ||
<div className='text-secondary text-sm'>Total: <span>{areas.length}</span></div> | ||
</div> | ||
</label> | ||
|
||
<GluttenFreeCrumbs ancestors={ancestors} pathTokens={pathTokens} /> | ||
<hr className='border mb-6' /> | ||
|
||
{/* Child area list */} | ||
<div className='two-column-table'> | ||
{areas.map((item, index) => | ||
<AreaItem key={item.uuid} area={item} index={index + 1} parentUuid={uuid} />)} | ||
</div> | ||
</div> | ||
</div> | ||
{/* <BreadCrumbs ancestors={ancestors} pathTokens={pathTokens} isClimbPage={false} /> */} | ||
|
||
</div> | ||
) | ||
} |
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
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
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
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 |
---|---|---|
|
@@ -103,6 +103,9 @@ export const QUERY_AREA_BY_ID = gql` | |
children { | ||
uuid | ||
} | ||
climbs { | ||
id | ||
} | ||
} | ||
content { | ||
description | ||
|
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