Skip to content

Commit cbe7451

Browse files
Added images to cloudinary CDN server
1 parent d22666d commit cbe7451

File tree

1,162 files changed

+1306
-1245
lines changed

Some content is hidden

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

1,162 files changed

+1306
-1245
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ client/yarn-debug.log*
3131
client/yarn-error.log*
3232

3333
# server
34+
server/common-data-service/src/main/resources/static/images
3435
server/authentication-service/.idea/
3536
server/common-data-service/.idea/
3637
server/seller-account-service/.idea/

client/src/components/routes/checkout/shippingOptions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ export function ShippingOptions() {
175175
for (const [id, product] of Object.entries(shoppingBagProducts.data)) {
176176
imageList.push(
177177
<Grid key={id} item sm={2} style={{alignSelf: "center", paddingBottom: "1rem"}}>
178-
<img key={product.id} src={product.imageName}
179-
alt={product.imageName} width="inherit" height={80}/>
178+
<img key={product.id} src={product.imageURL}
179+
alt={product.name} width="inherit" height={80}/>
180180
</Grid>
181181
)
182182
}

client/src/components/routes/detail/productDetails.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ function ProductDetails(props) {
155155
<Grid container>
156156

157157
<Grid item container justify="center" sm={6} md={5} lg={4}>
158-
<img src={selectedProduct.imageName} alt={selectedProduct.name}
158+
<img src={selectedProduct.imageURL} alt={selectedProduct.name}
159159
style={{height: "100%", width: "90%", paddingBottom: "2rem"}}
160160
title={selectedProduct.name}/>
161161
</Grid>

client/src/components/routes/home/home.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@ const Home = props => {
2323

2424
// Main screen API is loaded during Component Did mount
2525
useEffect(() => {
26-
log.info("[Home]: component did mount and home API is called.")
27-
props.getDataViaAPI(LOAD_HOME_PAGE, HOME_PAGE_DATA_API);
26+
log.info("[Home]: component did mount.")
27+
28+
if(!homeAPIData.hasOwnProperty("data")) {
29+
props.getDataViaAPI(LOAD_HOME_PAGE, HOME_PAGE_DATA_API);
30+
}
2831

2932
// eslint-disable-next-line
3033
}, [homePageDataReducer]);

client/src/components/routes/home/homeMenuIcons.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ const HomeMenuIcons = () => {
1111
const renderImageList = (imageList) => {
1212

1313
// filter out images which are related to home icons.
14-
imageList = imageList.filter(image => image.filePath.search("icon") !== -1)
14+
imageList = imageList.filter(image => image.imageLocalPath.search("icon") !== -1)
1515

1616
// map the image path and link
1717
return imageList.map(info => {
1818
return (
1919
<Grid key={info.id} item sm={2}>
2020
<Link to={`/products?q=${info.link}::page=0,${MAX_PRODUCTS_PER_PAGE}`}>
21-
<img src={info.filePath} alt={info.filePath} style={{width: '100%', height: '100%'}}
21+
<img src={info.imageURL} alt={info.imageLocalPath} style={{width: '100%', height: '100%'}}
2222
title={info.link}/>
2323
</Link>
2424
</Grid>

client/src/components/routes/home/topCategoriesAndBrands.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const TopCategoriesAndBrands = () => {
3838
return (
3939
<Grid item xs={6} sm={2} key={info.title} style={{textAlign: "center"}}>
4040
<Link to={`/products?q=${filterQuery}::page=0,${MAX_PRODUCTS_PER_PAGE}`}>
41-
<img src={info.filePath} alt={info.filePath} style={{width: '80%', height: '100%'}}
41+
<img src={info.imageURL} alt={info.imageLocalPath} style={{width: '80%', height: '100%'}}
4242
title={info.title}/>
4343
</Link>
4444
</Grid>

client/src/components/routes/home/verticalSlider.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ const VerticalSlider = () => {
3232
}
3333

3434
// filter out images which are not for carousels.
35-
imageList = imageList.filter(image => image.filePath.search("icon") === -1)
35+
imageList = imageList.filter(image => image.imageLocalPath.search("icon") === -1)
3636

3737
log.trace("[VerticalSlider]: Rendering renderImageList imageList = " + JSON.stringify(imageList))
38-
return imageList.map(({id, filePath}) => {
39-
log.trace(`[VerticalSlider]: Rendering renderImageList imageList filePath = ${filePath}`)
38+
return imageList.map(({id, imageLocalPath, imageURL}) => {
39+
log.trace(`[VerticalSlider]: Rendering renderImageList imageList filePath = ${imageLocalPath}`)
4040
return (
41-
<img key={id} src={filePath} alt={filePath}/>
41+
<img key={id} src={imageURL} alt={imageLocalPath}/>
4242
)
4343
});
4444
};

client/src/components/routes/navbar/navBar.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ const NavBar = props => {
8181
props.setTokenFromCookie(tokenIdFromCookie)
8282
}
8383
}
84-
props.getDataViaAPI(LOAD_TABS_DATA, TABS_DATA_API)
84+
if(!tabsAPIData.hasOwnProperty("data")) {
85+
props.getDataViaAPI(LOAD_TABS_DATA, TABS_DATA_API)
86+
}
8587

8688
setAddToCartValuesFromCookie()
8789

client/src/components/routes/product/filterProductDisplay.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const FilterProductDisplay = props => {
9191
<Grid item>
9292
<Link to={`${DETAILS_ROUTE}${history.location.search}::product_id=${info.id}`}
9393
onClick={handleImageClick(info)}>
94-
<img src={info.imageName} alt={info.name}
94+
<img src={info.imageURL} alt={info.name}
9595
style={{height: "100%", width: "100%"}}
9696
title={info.name}/>
9797
</Link>

client/src/components/routes/shoppingBag.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,8 @@ function ShoppingBag(props) {
212212
shoppingBagProductsList.push(
213213
<Grid item container key={product.id} style={{border: '1px solid #eaeaec', margin: "1rem 0"}}>
214214
<Grid item container justify="center" xs={5} sm={3}>
215-
<img src={product.imageName} style={{height: "90%", width: "80%", paddingTop: "1rem"}}/>
215+
<img src={product.imageURL} alt={product.name}
216+
style={{height: "90%", width: "80%", paddingTop: "1rem"}}/>
216217
</Grid>
217218

218219
<Grid item container xs={7} sm={9}>

0 commit comments

Comments
 (0)