Skip to content

Commit

Permalink
✨ Templates button in the sidebar (#802)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasangill1 committed Jun 14, 2023
1 parent 6a269e3 commit dc5eea6
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion next/src/layout/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Fragment, useEffect, useState } from "react";
import { Transition } from "@headlessui/react";
import { useAuth } from "../hooks/useAuth";
import { useRouter } from "next/router";
import { FaBars, FaCog, FaHome } from "react-icons/fa";
import { FaBars, FaCog, FaFileCode, FaHome } from "react-icons/fa";
import clsx from "clsx";
import Image from "next/image";
import DottedGridBackground from "../components/DottedGridBackground";
Expand Down Expand Up @@ -113,6 +113,26 @@ const SidebarLayout = (props: PropsWithChildren) => {
<li className="mb-2">
<div className="ml-2 text-xs font-semibold text-neutral-400">Pages</div>
<ul role="list" className="mt-2 space-y-1">
{router.route !== "/templates" ? (
<LinkItem
title="Templates"
icon={
<FaFileCode className="transition-transform group-hover:scale-110" />
}
onClick={() => {
router.push("/templates").catch(console.error);
}}
/>
) : (
<LinkItem
title="Home"
icon={<FaHome />}
onClick={() => {
void router.push("/");
}}
/>
)}

{router.route !== "/settings" ? (
<LinkItem
title="Settings"
Expand Down

1 comment on commit dc5eea6

@vercel
Copy link

@vercel vercel bot commented on dc5eea6 Jun 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs – ./docs

docs-git-main-reworkd.vercel.app
docs-reworkd.vercel.app
docs.reworkd.ai

Please sign in to comment.