Skip to content

Commit 8339263

Browse files
tsriramKyleAMathews
authored andcommitted
[v2] Update example sites to use Link from gatsby (#3942)
* remove gatsby-link as example sites dependency * import Link from gatsby instead of gatsby-link in example sites
1 parent 4bfe9a9 commit 8339263

File tree

98 files changed

+146
-163
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+146
-163
lines changed

examples/client-only-paths/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"author": "Kyle Mathews <[email protected]>",
77
"dependencies": {
88
"gatsby": "latest",
9-
"gatsby-link": "latest",
109
"gatsby-plugin-google-analytics": "latest",
1110
"gatsby-plugin-offline": "latest",
1211
"gatsby-source-drupal": "latest",
@@ -17,11 +16,13 @@
1716
"typography": "^0.15.8",
1817
"typography-breakpoint-constants": "^0.14.0"
1918
},
20-
"keywords": ["gatsby"],
19+
"keywords": [
20+
"gatsby"
21+
],
2122
"license": "MIT",
2223
"main": "n/a",
2324
"scripts": {
2425
"develop": "gatsby develop",
2526
"build": "gatsby build"
2627
}
27-
}
28+
}

examples/client-only-paths/src/layouts/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react"
2-
import Link from "gatsby-link"
2+
import { Link } from "gatsby"
33

44
import { rhythm } from "../utils/typography"
55

examples/client-only-paths/src/pages/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react"
2-
import Link from "gatsby-link"
2+
import { Link } from "gatsby"
33
import ReactCSSTransitionGroup from "react-addons-css-transition-group"
44
import { Route, Redirect } from "react-router-dom"
55

examples/gatsbygram/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
"version": "1.0.0",
66
"author": "Kyle Mathews <[email protected]>",
77
"dependencies": {
8-
"gatsby": "^1.9.52",
8+
"gatsby": "latest",
99
"gatsby-image": "^1.0.5",
10-
"gatsby-link": "^1.6.20",
1110
"gatsby-plugin-glamor": "^1.6.8",
1211
"gatsby-plugin-google-analytics": "^1.0.8",
1312
"gatsby-plugin-manifest": "^1.0.8",
@@ -44,4 +43,4 @@
4443
"build": "gatsby build",
4544
"deploy": "gatsby build --prefix-paths && gh-pages -d public"
4645
}
47-
}
46+
}

examples/gatsbygram/src/components/modal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Close from "react-icons/lib/md/close"
66
import findIndex from "lodash/findIndex"
77
import mousetrap from "mousetrap"
88
import * as PropTypes from "prop-types"
9-
import { navigateTo } from "gatsby-link"
9+
import { navigateTo } from "gatsby"
1010

1111
import { rhythm } from "../utils/typography"
1212

examples/gatsbygram/src/components/post.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as PropTypes from "prop-types"
22
import React from "react"
33
import HeartIcon from "react-icons/lib/fa/heart"
4-
import Link from "gatsby-link"
4+
import { Link } from "gatsby"
55

66
import { rhythm, scale } from "../utils/typography"
77
import presets from "../utils/presets"

examples/gatsbygram/src/layouts/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as PropTypes from "prop-types"
22
import React from "react"
33
import CameraIcon from "react-icons/lib/fa/camera-retro"
4-
import Link from "gatsby-link"
4+
import { Link } from "gatsby"
55

66
// Load the css for the Space Mono font.
77
import "typeface-space-mono"

examples/hn/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,20 @@
77
"dependencies": {
88
"flat": "^2.0.1",
99
"gatsby": "latest",
10-
"gatsby-link": "latest",
1110
"gatsby-plugin-google-analytics": "latest",
1211
"gatsby-plugin-manifest": "latest",
1312
"gatsby-plugin-offline": "latest",
1413
"gatsby-source-hacker-news": "latest",
1514
"lodash": "^4.16.4",
1615
"slash": "^1.0.0"
1716
},
18-
"keywords": ["gatsby"],
17+
"keywords": [
18+
"gatsby"
19+
],
1920
"license": "MIT",
2021
"main": "n/a",
2122
"scripts": {
2223
"develop": "gatsby develop",
2324
"build": "gatsby build"
2425
}
25-
}
26+
}

examples/hn/src/components/story-item.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react"
2-
import Link from "gatsby-link"
2+
import { Link } from "gatsby"
33

44
class StoryItem extends React.Component {
55
render() {

examples/hn/src/layouts/default.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react"
2-
import Link from "gatsby-link"
2+
import { Link } from "gatsby"
33

44
import "../css/news.css"
55
import y18Gif from "../images/y18.gif"

0 commit comments

Comments
 (0)