-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
27 changed files
with
1,998 additions
and
774 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1 @@ | ||
module.exports = { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} | ||
module.exports = { plugins: { autoprefixer: {} } } |
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,22 +1,29 @@ | ||
import Link from 'next/link' | ||
import type { FC } from 'react' | ||
import { Breadcrumb, BreadcrumbItem, BreadcrumbLink } from '@chakra-ui/react' | ||
import useBreadcrumb from '~/hooks/useBreadcrumb' | ||
|
||
const Breadcrumb: FC = () => { | ||
const Breadcrumbs: FC = () => { | ||
const [breadcrumbs] = useBreadcrumb() | ||
|
||
return ( | ||
<div className="text-sm breadcrumbs"> | ||
<ul> | ||
{ | ||
breadcrumbs | ||
.slice(0, breadcrumbs.length - 1) | ||
.map(v => (<li key={v.path}><Link href={v.path}><a>{v.breadcrumb}</a></Link></li>)) | ||
} | ||
<li>{breadcrumbs.at(-1)?.breadcrumb}</li> | ||
</ul> | ||
</div> | ||
<Breadcrumb> | ||
{ | ||
breadcrumbs | ||
.slice(0, breadcrumbs.length - 1) | ||
.map(v => ( | ||
<BreadcrumbItem key={v.path}> | ||
<Link href={v.path}> | ||
<BreadcrumbLink> | ||
{v.breadcrumb} | ||
</BreadcrumbLink> | ||
</Link> | ||
</BreadcrumbItem> | ||
)) | ||
} | ||
<BreadcrumbItem><BreadcrumbLink>{breadcrumbs.at(-1)?.breadcrumb}</BreadcrumbLink></BreadcrumbItem> | ||
</Breadcrumb> | ||
) | ||
} | ||
|
||
export default Breadcrumb | ||
export default Breadcrumbs |
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
Oops, something went wrong.