-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: added tabs to swtich app router and pages router tutorial (#1900)
- Loading branch information
Showing
2 changed files
with
39 additions
and
3 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,37 @@ | ||
import { useState } from "react"; | ||
|
||
export function IntroductionTab() { | ||
const [isAppRouterSelected, setIsAppRouterSelected] = useState(true); | ||
return ( | ||
<> | ||
<div className="flex w-full justify-center gap-10 py-5"> | ||
<button | ||
className={`${isAppRouterSelected ? "bg-primary text-white" : "bg-transparent"} inline-flex cursor-pointer items-center rounded-lg px-4 py-2 text-sm font-semibold transition-colors duration-500 hover:no-underline md:px-5 md:text-base lg:px-4 lg:py-3 `} | ||
onClick={() => setIsAppRouterSelected(true)} | ||
> | ||
App Router | ||
</button> | ||
<button | ||
className={`${!isAppRouterSelected ? "bg-primary text-white" : "bg-transparent"} inline-flex cursor-pointer items-center rounded-lg px-4 py-2 text-sm font-semibold transition-colors duration-500 hover:no-underline md:px-5 md:text-base lg:px-4 lg:py-3 `} | ||
onClick={() => setIsAppRouterSelected(false)} | ||
> | ||
{" "} | ||
Pages Router | ||
</button> | ||
</div> | ||
<div className="embed"> | ||
<iframe | ||
width="560" | ||
height="315" | ||
src={ | ||
isAppRouterSelected | ||
? "https://www.youtube.com/embed/d5x0JCZbAJs" | ||
: "https://www.youtube.com/embed/YkOSUVzOAA4" | ||
} | ||
title="The best stack for your next project" | ||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" | ||
></iframe> | ||
</div> | ||
</> | ||
); | ||
} |
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