From 14c9394a07768a2c3301365fb9b584d12e7b71e0 Mon Sep 17 00:00:00 2001 From: Dereje Getahun Date: Fri, 21 Apr 2023 14:04:34 +0300 Subject: [PATCH] more cleanup after vite migration --- .eslintignore | 2 +- README.md | 2 +- client/{public => src/assets}/backscreen.png | Bin client/{public => src/assets}/error.png | Bin client/src/components/cover/cover.scss | 2 +- .../imagebuild/HandleThumbnailImage.tsx | 16 +- .../src/components/imagebuild/Imagebuild.tsx | 6 +- .../src/components/imagebuild/MasonryPins.tsx | 24 +- client/src/components/mypins/mypins.tsx | 5 +- .../src/components/mypins/pincreatemodal.tsx | 2 +- client/src/components/profile/Profile.tsx | 4 +- package-lock.json | 4035 ++--------------- package.json | 14 +- .../imagebuild/HandleThumbnailImage.test.tsx | 30 +- .../components/imagebuild/Imagebuild.test.tsx | 26 +- .../__snapshots__/MasonryPins.test.tsx.snap | 6 +- .../__snapshots__/Profile.test.tsx.snap | 8 +- 17 files changed, 553 insertions(+), 3629 deletions(-) rename client/{public => src/assets}/backscreen.png (100%) rename client/{public => src/assets}/error.png (100%) diff --git a/.eslintignore b/.eslintignore index 9dc2b4df..57d4673c 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,5 +1,5 @@ node_modules # Ignore linting on CRA created files -/client/public +/client/dist /dist /server_build \ No newline at end of file diff --git a/README.md b/README.md index fb306d40..a5f35064 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ npm test * [Express](https://expressjs.com/) - Node.js web application framework * [Material UI](https://mui.com/) - A library of React UI components that implements Google's Material Design. * [Google Cloud Vision API](https://cloud.google.com/vision/docs) - image labeling, face and landmark detection... -* [...and more](https://github.com/Dereje1/Pinterest-Clone/blob/c4d9b509fda1c0079811c04ead336df950e50413/package.json#L17) +* [...and more](https://github.com/Dereje1/Pinterest-Clone/blob/master/package.json#L18) ## Authors diff --git a/client/public/backscreen.png b/client/src/assets/backscreen.png similarity index 100% rename from client/public/backscreen.png rename to client/src/assets/backscreen.png diff --git a/client/public/error.png b/client/src/assets/error.png similarity index 100% rename from client/public/error.png rename to client/src/assets/error.png diff --git a/client/src/components/cover/cover.scss b/client/src/components/cover/cover.scss index 3b498e62..89570961 100644 --- a/client/src/components/cover/cover.scss +++ b/client/src/components/cover/cover.scss @@ -8,7 +8,7 @@ top: -50%; left: -50%; z-index: -1; - background: url('../../../public/backscreen.png'); + background: url('../../assets/backscreen.png'); @include animation('bkimage'); animation-duration: 33s; animation-timing-function: linear; diff --git a/client/src/components/imagebuild/HandleThumbnailImage.tsx b/client/src/components/imagebuild/HandleThumbnailImage.tsx index a2230ae5..b4074795 100644 --- a/client/src/components/imagebuild/HandleThumbnailImage.tsx +++ b/client/src/components/imagebuild/HandleThumbnailImage.tsx @@ -3,35 +3,35 @@ import { PinType } from '../../interfaces'; import './imagebuild.scss'; interface HandleThumbnailImageProps { - element: PinType + pin: PinType pinImage: (pin: PinType) => void deletePin: ((pin: PinType) => void) | null } -function HandleThumbnailImage({ element, pinImage, deletePin }: HandleThumbnailImageProps) { +function HandleThumbnailImage({ pin, pinImage, deletePin }: HandleThumbnailImageProps) { /* For the logged in user's profile page */ if (deletePin) { return ( ); } /* For anything other than the logged in user's profile page */ - if (element.owns) { + if (pin.owns) { return null; } - if (element.hasSaved) { + if (pin.hasSaved) { return ( @@ -42,7 +42,7 @@ function HandleThumbnailImage({ element, pinImage, deletePin }: HandleThumbnailI