Skip to content

Commit 536607c

Browse files
sensorarioSimone Gentili
authored andcommitted
feat: add missing linking and navigating example with template literlas`
1 parent 989c535 commit 536607c

File tree

19 files changed

+4450
-1
lines changed

19 files changed

+4450
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ _Qui di seguito ci sono solo le novità e gli aggiornamenti successivi alla pubb
2121
### Next.js
2222

2323
- [Next] [./app/not-found.tsx](/next.js/page-not-found)
24+
- [Next] [linking & navigating](/next.js/linking-and-navigating)
2425

2526
### TypeScript
2627

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
.yarn/install-state.gz
8+
9+
# testing
10+
/coverage
11+
12+
# next.js
13+
/.next/
14+
/out/
15+
16+
# production
17+
/build
18+
19+
# misc
20+
.DS_Store
21+
*.pem
22+
23+
# debug
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# local env files
29+
.env*.local
30+
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo
36+
next-env.d.ts
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Linking and Navigating
2+
3+
- [torna alla home](/)
4+
5+
## Come fare...
6+
7+
```
8+
npm install
9+
npm run dev
10+
```
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import PostList from "@/src/components/PostList";
2+
3+
export default function Page() {
4+
return (
5+
<>
6+
<PostList
7+
posts={[
8+
{
9+
title: "Hello world!!",
10+
},
11+
{
12+
title: "Secondo articolo...",
13+
},
14+
]}
15+
/>
16+
</>
17+
);
18+
}
25.3 KB
Binary file not shown.

next.js/linking-and-navigating/app/globals.css

Whitespace-only changes.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import type { Metadata } from "next";
2+
import { Inter } from "next/font/google";
3+
import "./globals.css";
4+
import Link from "next/link";
5+
6+
const inter = Inter({ subsets: ["latin"] });
7+
8+
export const metadata: Metadata = {
9+
title: "Create Next App",
10+
description: "Generated by create next app",
11+
};
12+
13+
export default function RootLayout({
14+
children,
15+
}: Readonly<{
16+
children: React.ReactNode;
17+
}>) {
18+
return (
19+
<html lang="en">
20+
<body className={inter.className}>
21+
<ul>
22+
<li>
23+
<Link href="/">home</Link>
24+
</li>
25+
<li>
26+
<Link href="/pagina">pagina</Link>
27+
</li>
28+
<li>
29+
<Link href="/blog">blog</Link>
30+
</li>
31+
</ul>
32+
{children}
33+
</body>
34+
</html>
35+
);
36+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import Link from "next/link";
2+
3+
export default function Home() {
4+
return (
5+
<>
6+
<h1>Homepage</h1>
7+
</>
8+
);
9+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export const Page = () => {
2+
return <>Io sono la pagina</>;
3+
};
4+
5+
export default Page;

0 commit comments

Comments
 (0)