Last active
January 18, 2018 11:40
-
-
Save muhammadghazali/d2e132a776a44d1db06a60c0a982608b to your computer and use it in GitHub Desktop.
snippet for https://muhammadghazali.wordpress.com/2018/01/18/using-jsinspect-to-detect-duplicate-codes/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Match - 2 instances | |
./components/A.js:1,36 | |
import React, { Component } from 'react'; | |
import { Link } from 'react-router'; | |
import ExpandImage from '../containers/assets/icon_expand.svg'; | |
import mapUS from '../containers/assets/map-us.svg'; | |
import mapEurope from '../containers/assets/map-europe.svg'; | |
import mapAsia from '../containers/assets/map-asia.svg'; | |
const regions = [ | |
{ | |
img: mapUS, | |
name: "US", | |
units: 10, | |
growth: 20 | |
}, | |
{ | |
img: mapEurope, | |
name: "Europe", | |
units: 15, | |
growth: 30 | |
}, | |
{ | |
img: mapAsia, | |
name: "Asia", | |
units: 20, | |
growth: 40 | |
} | |
]; | |
class Map extends Component { | |
constructor(props) { | |
super(props); | |
} | |
render() { | |
return ( | |
<div className="row img-map"> | |
./components/B.js:1,36 | |
import React, { Component } from 'react'; | |
import { Link } from 'react-router'; | |
import ExpandImage from '../containers/assets/icon_expand.svg'; | |
import mapUS from '../containers/assets/map-us.svg'; | |
import mapEurope from '../containers/assets/map-europe.svg'; | |
import mapAsia from '../containers/assets/map-asia.svg'; | |
const regions = [ | |
{ | |
img: mapUS, | |
name: "US", | |
units: 10, | |
growth: 20 | |
}, | |
{ | |
img: mapEurope, | |
name: "Europe", | |
units: 15, | |
growth: 30 | |
}, | |
{ | |
img: mapAsia, | |
name: "Asia", | |
units: 20, | |
growth: 40 | |
} | |
]; | |
class Map extends Component { | |
constructor(props) { | |
super(props); | |
} | |
render() { | |
return ( | |
<div className="row img-map"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment