-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* some fixes and also breadcrumbs * need to wire up the headers, but it should all work * better sidebar + headers * README
- Loading branch information
1 parent
5259dda
commit be588ce
Showing
15 changed files
with
136 additions
and
384 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
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { useMatches } from "react-router-dom"; | ||
import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "./ui/breadcrumb" | ||
import { createRouteObjects } from "@/lib/utils"; | ||
import { useSpec } from "@/state/StateContext"; | ||
|
||
export default function AppBreadcrumb() { | ||
const breadcrumbs = useMatches(); | ||
const {spec, setSpec} = useSpec(); | ||
console.log(breadcrumbs); | ||
console.log(createRouteObjects(spec?.resources())); | ||
|
||
let breadcrumb_elements = []; | ||
for(const i of breadcrumbs) { | ||
breadcrumb_elements.push(<BreadcrumbItem className="hidden md:block"> | ||
<BreadcrumbPage>{i.pathname}</BreadcrumbPage> | ||
</BreadcrumbItem>); | ||
breadcrumb_elements.push(<BreadcrumbSeparator className="hidden md:block" />); | ||
} | ||
|
||
return ( | ||
<Breadcrumb> | ||
<BreadcrumbList> | ||
{breadcrumb_elements} | ||
</BreadcrumbList> | ||
</Breadcrumb> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.