Skip to content

Commit c732cdd

Browse files
committed
Simplify Gatsby example
1 parent a5a90d9 commit c732cdd

File tree

9 files changed

+4
-493
lines changed

9 files changed

+4
-493
lines changed

react-gallery-carousel-gatsby/gatsby-config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = {
33
title: 'react-gallery-carousel Gatsby example',
44
description:
55
'react-gallery-carousel is a mobile-friendly dependency-free React carousel component with support for touch, mouse dragging, lazy loading, thumbnails, modal, keyboard navigation, RTL and pinch to zoom.',
6-
url: 'https://rgc.yifanai.com',
6+
url: 'https://yifanai.com/rgc',
77
image: '/images/icon.png',
88
twitterUsername: '@yifaneye'
99
},

react-gallery-carousel-gatsby/src/components/Carousel1.js

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

react-gallery-carousel-gatsby/src/components/Carousel2.js

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

react-gallery-carousel-gatsby/src/components/Carousel3.js

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

react-gallery-carousel-gatsby/src/components/Carousel4.js

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

react-gallery-carousel-gatsby/src/components/Carousel5.js

Lines changed: 0 additions & 118 deletions
This file was deleted.
Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,4 @@
1-
import React from 'react';
2-
import Carousel1 from '../components/Carousel1';
3-
import Carousel2 from '../components/Carousel2';
4-
import Carousel3 from '../components/Carousel3';
5-
import Carousel4 from '../components/Carousel4';
6-
import Carousel5 from '../components/Carousel5';
7-
import '../styles/index.css';
1+
import App from '../../../example/src/App.js';
2+
import '../../../example/src/index.css';
83

9-
const imageIDs = Array(30) // the maximum is currently 149
10-
.fill(1)
11-
.map((_, i) => i + 1);
12-
const images = imageIDs.map((imageID) => {
13-
return {
14-
src: `https://placedog.net/400/240?id=${imageID}`,
15-
srcset: `https://placedog.net/400/240?id=${imageID} 400w, https://placedog.net/700/420?id=${imageID} 700w, https://placedog.net/1000/600?id=${imageID} 1000w`,
16-
sizes: '(max-width: 1000px) 400px, (max-width: 2000px) 700px, 1000px',
17-
alt: `Dog No. ${imageID}. Dogs are domesticated mammals, not natural wild animals.`,
18-
thumbnail: `https://placedog.net/100/60?id=${imageID}`
19-
};
20-
});
21-
22-
const IndexPage = () => {
23-
return (
24-
<div className='carousel-page'>
25-
<Carousel1 />
26-
<Carousel2 images={images} />
27-
<Carousel3 images={images} />
28-
<Carousel4 images={images} />
29-
<Carousel5 images={images} />
30-
</div>
31-
);
32-
};
33-
34-
export default IndexPage;
4+
export default App;

0 commit comments

Comments
 (0)