File tree Expand file tree Collapse file tree 5 files changed +7
-6
lines changed Expand file tree Collapse file tree 5 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 6
6
Wrapper ,
7
7
} from "./Dropdown.styles" ;
8
8
import { Icon } from "../Icon/Icon" ;
9
+ import Link from "next/link" ;
9
10
10
11
export const Dropdown = ( { item } : { item : ISection } ) => {
11
12
const { name, path, children } = item ;
@@ -14,7 +15,7 @@ export const Dropdown = ({ item }: { item: ISection }) => {
14
15
return (
15
16
< NavItem >
16
17
< ItemContent >
17
- < a href = { path } > { name } </ a >
18
+ { path ? < Link href = { path } > { name } </ Link > : < span > { name } </ span > }
18
19
</ ItemContent >
19
20
</ NavItem >
20
21
) ;
@@ -23,7 +24,7 @@ export const Dropdown = ({ item }: { item: ISection }) => {
23
24
return (
24
25
< NavItem >
25
26
< ItemContent >
26
- < a href = { path } > { name } </ a >
27
+ { path ? < Link href = { path } > { name } </ Link > : < span > { name } </ span > }
27
28
< Icon id = "arrow-head" width = { 11 } height = { 9 } />
28
29
</ ItemContent >
29
30
{ children && (
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ const Footer = () => {
16
16
< LogoImage id = "logo-oca-white" width = { 200 } height = { 150 } />
17
17
< References >
18
18
{ Object . entries ( sections ) . map ( ( [ key , item ] ) => (
19
- < Sections key = { key } href = { item . path } >
19
+ < Sections key = { key } href = { item . path || "" } >
20
20
{ item . name }
21
21
</ Sections >
22
22
) ) }
Original file line number Diff line number Diff line change 1
1
import styled from "styled-components" ;
2
2
import { Icon } from "../Icon/Icon" ;
3
+ import Link from "next/link" ;
3
4
4
5
export const Wrapper = styled . div `
5
6
display: flex;
@@ -70,7 +71,7 @@ export const SocialMedia = styled.div`
70
71
pointer-events: all;
71
72
` ;
72
73
73
- export const MediaWrapper = styled . a `
74
+ export const MediaWrapper = styled ( Link ) `
74
75
display: flex;
75
76
align-items: center;
76
77
color: ${ ( { theme } ) => theme . colors . black } 90;
Original file line number Diff line number Diff line change @@ -45,7 +45,6 @@ export const sections: ISections = {
45
45
} ,
46
46
about : {
47
47
name : "Sobre nós" ,
48
- path : "/about" ,
49
48
children : {
50
49
team : {
51
50
name : "Nosso time" ,
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export interface IOCAChannel {
32
32
33
33
export interface ISection {
34
34
name : string ;
35
- path : string ;
35
+ path ? : string ;
36
36
children ?: { [ key : string ] : ISection } ;
37
37
}
38
38
You can’t perform that action at this time.
0 commit comments