File tree 2 files changed +16
-20
lines changed
2 files changed +16
-20
lines changed Original file line number Diff line number Diff line change 1
1
import Menu from '@mui/material/Menu' ;
2
2
import MenuItem from '@mui/material/MenuItem' ;
3
3
import Link from 'next/link' ;
4
- import { NextRouter , withRouter } from 'next/router' ;
4
+ import Router , { NextRouter , withRouter } from 'next/router' ;
5
5
import React from 'react' ;
6
6
7
7
type Props = {
@@ -66,17 +66,16 @@ class MenuWithLinks extends React.PureComponent<Props, State> {
66
66
{ option . text }
67
67
</ MenuItem >
68
68
) : (
69
- < Link key = { option . href } href = { option . href } as = { option . as } passHref >
70
- < MenuItem
71
- key = { option . href }
72
- style = { {
73
- fontWeight : router . asPath . includes ( option . highlighterSlug ) ? 600 : 300 ,
74
- fontSize : '14px' ,
75
- } }
76
- >
77
- { option . text }
78
- </ MenuItem >
79
- </ Link >
69
+ < MenuItem
70
+ key = { option . href }
71
+ style = { {
72
+ fontWeight : router . asPath . includes ( option . highlighterSlug ) ? 600 : 300 ,
73
+ fontSize : '14px' ,
74
+ } }
75
+ onClick = { ( ) => Router . push ( option . href , option . as ) }
76
+ >
77
+ { option . text }
78
+ </ MenuItem >
80
79
) ,
81
80
) }
82
81
</ Menu >
Original file line number Diff line number Diff line change @@ -47,15 +47,12 @@ class DiscussionListItem extends React.Component<Props> {
47
47
scroll = { false }
48
48
href = { `/discussion?teamSlug=${ team . slug } &discussionSlug=${ discussion . slug } ` }
49
49
as = { `/teams/${ team . slug } /discussions/${ discussion . slug } ` }
50
+ style = { { fontWeight : 300 , color : isThemeDark ? '#fff' : '#000' } }
51
+ key = { discussion . _id }
50
52
>
51
- < a
52
- style = { { fontWeight : 300 , color : isThemeDark ? '#fff' : '#000' } }
53
- key = { discussion . _id }
54
- >
55
- { discussion . name . length > trimmingLength
56
- ? `${ discussion . name . substring ( 0 , trimmingLength ) } ...`
57
- : discussion . name }
58
- </ a >
53
+ { discussion . name . length > trimmingLength
54
+ ? `${ discussion . name . substring ( 0 , trimmingLength ) } ...`
55
+ : discussion . name }
59
56
</ Link >
60
57
< div
61
58
style = { {
You can’t perform that action at this time.
0 commit comments