File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change
1
+ const Details = ( ) => {
2
+ return (
3
+ < div >
4
+ < h1 > Details Page</ h1 >
5
+ </ div >
6
+ ) ;
7
+ }
8
+
9
+ export default Details ;
Original file line number Diff line number Diff line change 1
- import styles from '../../styles/Jobs.module.css'
1
+ import styles from '../../styles/Ninjas.module.css'
2
+ import Link from 'next/link'
2
3
3
4
export const getStaticProps = async ( ) => {
4
5
const res = await fetch ( 'https://jsonplaceholder.typicode.com/users' ) ;
@@ -16,11 +17,11 @@ const Ninjas = ({ ninjas }) => {
16
17
< div >
17
18
< h1 > All Ninjas</ h1 >
18
19
{ ninjas . map ( ninja => (
19
- < div key = { ninja . id } >
20
+ < Link href = { '/ninjas/' + ninja . id } key = { ninja . id } >
20
21
< a className = { styles . single } >
21
22
< h3 > { ninja . name } </ h3 >
22
23
</ a >
23
- </ div >
24
+ </ Link >
24
25
) ) }
25
26
</ div >
26
27
) ;
File renamed without changes.
You can’t perform that action at this time.
0 commit comments