-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix unnecessary use of parallels routes for a "header" layout title and replace it with a simple component "Header" - Convert useRouter().pathname to usePathname according to documentation (useRouter().pathname was undefined and the active props of NavLInk weren't working).
- Loading branch information
1 parent
3180759
commit 14a70a9
Showing
7 changed files
with
3,023 additions
and
37 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const Header = ({ title }) => { | ||
return ( | ||
<header className="bg-white shadow"> | ||
<div className="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8"> | ||
|
||
<h2 className="font-semibold text-xl text-gray-800 leading-tight"> | ||
{title} | ||
</h2> | ||
</div> | ||
</header> | ||
) | ||
} | ||
|
||
export default Header |
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,19 +1,24 @@ | ||
import Header from '@/app/(app)/Header' | ||
|
||
export const metadata = { | ||
title: 'Laravel - Dashboard', | ||
} | ||
|
||
const Dashboard = () => { | ||
return ( | ||
<div className="py-12"> | ||
<div className="max-w-7xl mx-auto sm:px-6 lg:px-8"> | ||
<div className="bg-white overflow-hidden shadow-sm sm:rounded-lg"> | ||
<div className="p-6 bg-white border-b border-gray-200"> | ||
You're logged in! | ||
<> | ||
<Header title="Dashboard" /> | ||
<div className="py-12"> | ||
<div className="max-w-7xl mx-auto sm:px-6 lg:px-8"> | ||
<div className="bg-white overflow-hidden shadow-sm sm:rounded-lg"> | ||
<div className="p-6 bg-white border-b border-gray-200"> | ||
You are logged in! | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</> | ||
) | ||
} | ||
|
||
export default Dashboard | ||
export default Dashboard |
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.