Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
hfpp2012
/
react-spd
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 629317ec
authored
May 22, 2017
by
hfpp2012 yinsigan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix
1 parent
6ed16e7d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
src/components/Element.js
src/components/Header.js
src/index.js
src/components/Element.js
View file @
629317e
...
...
@@ -228,7 +228,7 @@ export default class Element extends React.Component {
handleDoubleClick
()
{
const
childrenObjectType
=
this
.
props
.
childrenObjectType
const
url
=
`/regional_design/
${
this
.
props
.
id
}
?object=
${
childrenObjectType
}
`
const
url
=
`/
web/
regional_design/
${
this
.
props
.
id
}
?object=
${
childrenObjectType
}
`
if
(
childrenObjectType
!=
'drug_brandreth_grid'
)
{
this
.
props
.
hashHistory
.
push
(
url
)
}
...
...
src/components/Header.js
View file @
629317e
...
...
@@ -36,7 +36,7 @@ export default class Header extends React.Component {
}
else
{
const
data
=
this
.
state
.
data
.
map
((
repo
)
=>
{
const
url
=
`/regional_design/
${
repo
.
id
}
?object=repo`
const
url
=
`/
web/
regional_design/
${
repo
.
id
}
?object=repo`
return
(
<
Link
key
=
{
repo
.
id
}
className
=
'btn btn-default mr15'
to
=
{
url
}
>
{
repo
.
name
}
<
/Link
>
)
...
...
src/index.js
View file @
629317e
...
...
@@ -4,7 +4,8 @@ import Spd from './containers/Spd'
import
{
HashRouter
as
Router
,
Route
,
Link
Link
,
IndexRoute
}
from
'react-router-dom'
import
RegionalDesign
from
'./components/RegionalDesign'
...
...
@@ -12,7 +13,7 @@ import RegionalDesign from './components/RegionalDesign'
ReactDOM
.
render
(
<
Router
handler
=
{
Spd
}
history
=
{
Router
}
>
<
Spd
>
<
Route
path
=
"/regional_design/:id"
component
=
{
RegionalDesign
}
/
>
<
Route
path
=
"/
web/
regional_design/:id"
component
=
{
RegionalDesign
}
/
>
<
/Spd
>
<
/Router>
,
document
.
getElementById
(
'root'
)
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment