generated from taylorbryant/gatsby-starter-tailwind
-
-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use friendly page url in breadcrums and elsewhere
- Loading branch information
viet nguyen
committed
Nov 27, 2023
1 parent
cd4aee1
commit f897ba5
Showing
11 changed files
with
74 additions
and
42 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,8 @@ | ||
import { AreaPageContainer } from '@/app/components/ui/AreaPageContainer' | ||
|
||
/** | ||
* Loading skeleton for /area/<id> page. | ||
*/ | ||
export default function Loading (): JSX.Element { | ||
return (<AreaPageContainer />) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { GallerySkeleton } from '@/components/media/PhotoMontage' | ||
import React from 'react' | ||
|
||
/** | ||
* Area page containter. Show loading skeleton if no params are provided. | ||
*/ | ||
export const AreaPageContainer: React.FC<{ | ||
photoGallery?: React.ReactNode | ||
breadcrumbs?: React.ReactNode | ||
map?: React.ReactNode | ||
children?: React.ReactNode | ||
}> = ({ photoGallery, breadcrumbs, map, children }) => { | ||
return ( | ||
<article> | ||
<div className='p-4 mx-auto max-w-5xl xl:max-w-7xl'> | ||
{photoGallery == null ? <GallerySkeleton /> : photoGallery} | ||
{breadcrumbs == null ? <BreadCrumbsSkeleton /> : breadcrumbs} | ||
{children == null ? <ContentSkeleton /> : children} | ||
</div> | ||
<div id='#map' className='w-full mt-16 relative h-[90vh] border-t'> | ||
{map != null && map} | ||
</div> | ||
</article> | ||
) | ||
} | ||
|
||
const BreadCrumbsSkeleton: React.FC = () => (<div className='w-full my-2 h-12 bg-base-200 rounded-box' />) | ||
const ContentSkeleton: React.FC = () => (<div className='w-full mt-6 h-80 bg-base-200 rounded-box' />) |
This file was deleted.
Oops, something went wrong.
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
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