data from settings.js
This commit is contained in:
1
.env.local
Normal file
1
.env.local
Normal file
@ -0,0 +1 @@
|
||||
REACT_APP_WWW_ROOT = "http://localhost/gallery/"
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -13,7 +13,6 @@
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
@ -27,6 +27,7 @@
|
||||
<title>React App</title>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript" src="settings.js"></script>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root"></div>
|
||||
<!--
|
||||
|
||||
45
public/settings.js
Normal file
45
public/settings.js
Normal file
@ -0,0 +1,45 @@
|
||||
window.globalThis= {
|
||||
"gallery":
|
||||
[
|
||||
{
|
||||
"original": "IMG_20230217_161150_331.jpg",
|
||||
"thumbnail": "thumb-IMG_20230217_161150_331.jpg"
|
||||
},
|
||||
{
|
||||
"original": "IMG_20230218_182608_079.jpg",
|
||||
"thumbnail": "thumb-IMG_20230218_182608_079.jpg"
|
||||
},
|
||||
{
|
||||
"original": "IMG_20230218_182625_867.jpg",
|
||||
"thumbnail": "thumb-IMG_20230218_182625_867.jpg"
|
||||
},
|
||||
{
|
||||
"original": "IMG_20230218_184359_940.jpg",
|
||||
"thumbnail": "thumb-IMG_20230218_184359_940.jpg"
|
||||
},
|
||||
{
|
||||
"original": "IMG_20230218_184429_386.jpg",
|
||||
"thumbnail": "thumb-IMG_20230218_184429_386.jpg"
|
||||
},
|
||||
{
|
||||
"original": "IMG_20230305_164907_552.jpg",
|
||||
"thumbnail": "thumb-IMG_20230305_164907_552.jpg"
|
||||
},
|
||||
{
|
||||
"original": "IMG_20230305_164913_285.jpg",
|
||||
"thumbnail": "thumb-IMG_20230305_164913_285.jpg"
|
||||
},
|
||||
{
|
||||
"original": "IMG_20230305_164919_797.jpg",
|
||||
"thumbnail": "thumb-IMG_20230305_164919_797.jpg"
|
||||
},
|
||||
{
|
||||
"original": "IMG_20230305_164921_376.jpg",
|
||||
"thumbnail": "thumb-IMG_20230305_164921_376.jpg"
|
||||
},
|
||||
{
|
||||
"original": "IMG_20230305_164923_912.jpg",
|
||||
"thumbnail": "thumb-IMG_20230305_164923_912.jpg"
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -32,6 +32,7 @@ export default function ImageGalleryX()
|
||||
return imageGalleryItems.map((item: ReactImageGalleryItem) => {
|
||||
const newItem = { ...item };
|
||||
newItem.original = uploads + newItem.original;
|
||||
newItem.thumbnail = uploads + newItem.thumbnail;
|
||||
newItem.thumbnailClass = classes.thubmnail;
|
||||
return newItem;
|
||||
});
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { ReactImageGalleryItem } from 'react-image-gallery';
|
||||
import data from './gallery.json';
|
||||
const {gallery} = window.globalThis as any;
|
||||
console.log(gallery);
|
||||
|
||||
|
||||
export const imageGalleryItems: ReactImageGalleryItem[] = data;
|
||||
export const imageGalleryItems: ReactImageGalleryItem[] = gallery;
|
||||
|
||||
Reference in New Issue
Block a user