Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commiteea18f6

Browse files
committed
seperate container in body
1 parentd851c19 commiteea18f6

File tree

23 files changed

+263
-501
lines changed

23 files changed

+263
-501
lines changed

‎components/BodyLayout/index.js‎

Lines changed: 0 additions & 41 deletions
This file was deleted.

‎containers/Banner/index.js‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
*
3+
* Banner
4+
*
5+
*/
6+
7+
importReactfrom'react'
8+
import{inject,observer}from'mobx-react'
9+
10+
// import Link from 'next/link'
11+
12+
import{
13+
makeDebugger,
14+
storeSelector,
15+
getSVGIconPath,
16+
}from'../../utils/functions'
17+
18+
import*aslogicfrom'./logic'
19+
20+
import{Banner,BannerLogo}from'./styles'
21+
22+
constdebug=makeDebugger('C:Banner')
23+
24+
classBannerContainerextendsReact.Component{
25+
componentWillMount(){
26+
debug('mount')
27+
logic.init(this.props.banner)
28+
}
29+
30+
render(){
31+
const{ banner}=this.props
32+
const{ curUrlPath}=banner
33+
34+
constdefaultIcon='js'
35+
consticonKey=curUrlPath==='/' ?defaultIcon :curUrlPath
36+
37+
return(
38+
<Banner>
39+
<BannerLogopath={getSVGIconPath(iconKey)}/>
40+
</Banner>
41+
)
42+
}
43+
}
44+
45+
exportdefaultinject(storeSelector('banner'))(observer(BannerContainer))

‎containers/Banner/lang.js‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* Banner Langs
3+
*
4+
* This contains all the text for the Banner component.
5+
*/
6+
import{defineMessages}from'react-intl'
7+
8+
exportdefaultdefineMessages({
9+
header:{
10+
id:'containers.Banner.header',
11+
defaultMessage:'This is the Banner component !',
12+
},
13+
})

‎containers/Banner/logic.js‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// import R from 'ramda'
2+
3+
import{makeDebugger}from'../../utils/functions'
4+
5+
/* eslint-disable no-unused-vars */
6+
constdebug=makeDebugger('L:Banner')
7+
/* eslint-enable no-unused-vars */
8+
9+
letbanner=null
10+
11+
exportfunctionsomeMethod(){
12+
debug(banner)
13+
}
14+
15+
exportfunctioninit(selectedStore){
16+
banner=selectedStore
17+
}

‎containers/Banner/styles/index.js‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
importstyledfrom'styled-components'
2+
importReactSVGfrom'react-svg'
3+
4+
exportconstBanner=styled.div`
5+
padding: 5px;
6+
padding-left: 80px;
7+
height: 15vh;
8+
border-bottom: 1px solid tomato;
9+
`
10+
11+
exportconstBannerLogo=styled(ReactSVG)`
12+
margin-top: 2em;
13+
width: 100px;
14+
height: 100px;
15+
`
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// import React from 'react'
22
// import { shallow } from 'enzyme'
33

4-
// importContent from '../index'
4+
// importBanner from '../index'
55

6-
describe('<Content />',()=>{
6+
describe('<Banner />',()=>{
77
it('Expect to have unit tests specified',()=>{
8-
expect(true).toEqual(true)
8+
expect(true).toEqual(false)
99
})
1010
})

‎containers/Body/Home.js‎

Lines changed: 0 additions & 76 deletions
This file was deleted.

‎containers/Body/index.js‎

Lines changed: 0 additions & 89 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp