Skip to content

Commit

Permalink
add render api
Browse files Browse the repository at this point in the history
  • Loading branch information
kiranwankhade committed Jun 18, 2024
1 parent 6084c31 commit e59da08
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 31 deletions.
4 changes: 2 additions & 2 deletions src/Components/Carousal2.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function Carousal2({data}) {
})
}else{
likeFuc();
return axios.post(`https://busy-peplum-fawn.cyclic.app/wishList`,item);
return axios.post(`https://cyclicbackend.onrender.com/wishList`,item);
}

}
Expand Down Expand Up @@ -119,7 +119,7 @@ function Carousal2({data}) {
})
}else{
addtoCart()
return axios.post(`https://busy-peplum-fawn.cyclic.app/cart`,item)
return axios.post(`https://cyclicbackend.onrender.com/cart`,item)
}

}
Expand Down
4 changes: 2 additions & 2 deletions src/Pages/Cart.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { Box, Flex, Grid, GridItem,

const fetchData = async () => {
try {
const res = await axios.get(`https://busy-peplum-fawn.cyclic.app/cart`);
const res = await axios.get(`https://cyclicbackend.onrender.com/cart`);
setItems(res.data);
let x=0;
for(let i=0;i<res.data.length;i++)
Expand Down Expand Up @@ -108,7 +108,7 @@ import { Box, Flex, Grid, GridItem,


const handleRemove = async(id) => {
return axios.delete(`https://busy-peplum-fawn.cyclic.app/cart/${id}`);
return axios.delete(`https://cyclicbackend.onrender.com/cart/${id}`);
}

const removeFuc = (id) => {
Expand Down
10 changes: 5 additions & 5 deletions src/Pages/EyesCatPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const EyesCatPage = () => {
const fetchData = async () => {
try {
const res = await axios.get(
`https://busy-peplum-fawn.cyclic.app/products`
`https://cyclicbackend.onrender.com/products`
);
let data = res.data;

Expand All @@ -40,7 +40,7 @@ const EyesCatPage = () => {

async function onchangePrice(e){
try{
let res = await fetch(`https://busy-peplum-fawn.cyclic.app/products`);
let res = await fetch(`https://cyclicbackend.onrender.com/products`);
let data = await res.json();

let tempArray = data.filter((el) => {
Expand All @@ -67,7 +67,7 @@ const EyesCatPage = () => {

async function onchangeRatings(e){
try{
let res = await fetch(`https://busy-peplum-fawn.cyclic.app/products`);
let res = await fetch(`https://cyclicbackend.onrender.com/products`);
let data = await res.json();

let tempArray = data.filter((el) => {
Expand Down Expand Up @@ -105,7 +105,7 @@ const likeFuc = () => {
}

const handleWishlist = (item) => {
return axios.post(`https://busy-peplum-fawn.cyclic.app/wishList`,item)
return axios.post(`https://cyclicbackend.onrender.com/wishList`,item)
}


Expand All @@ -121,7 +121,7 @@ const addtoCart = () => {
}

const handleAddCart = (item) => {
return axios.post(`https://busy-peplum-fawn.cyclic.app/cart`,item)
return axios.post(`https://cyclicbackend.onrender.com/cart`,item)
}
const Star = ({ marked, starId }) => {
return (
Expand Down
10 changes: 5 additions & 5 deletions src/Pages/FaceCatPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const FaceCatPage = () => {
const fetchData = async () => {
try {
const res = await axios.get(
`https://busy-peplum-fawn.cyclic.app/products`
`https://cyclicbackend.onrender.com/products`
);
let data = res.data;

Expand All @@ -40,7 +40,7 @@ const FaceCatPage = () => {

async function onchangePrice(e){
try{
let res = await fetch(`https://busy-peplum-fawn.cyclic.app/products`);
let res = await fetch(`https://cyclicbackend.onrender.com/products`);
let data = await res.json();

let tempArray = data.filter((el) => {
Expand All @@ -67,7 +67,7 @@ const FaceCatPage = () => {

async function onchangeRatings(e){
try{
let res = await fetch(`https://busy-peplum-fawn.cyclic.app/products`);
let res = await fetch(`https://cyclicbackend.onrender.com/products`);
let data = await res.json();

let tempArray = data.filter((el) => {
Expand Down Expand Up @@ -104,7 +104,7 @@ const likeFuc = () => {
}

const handleWishlist = (item) => {
return axios.post(`https://busy-peplum-fawn.cyclic.app/wishList`,item)
return axios.post(`https://cyclicbackend.onrender.com/wishList`,item)
}


Expand All @@ -120,7 +120,7 @@ const addtoCart = () => {
}

const handleAddCart = (item) => {
return axios.post(`https://busy-peplum-fawn.cyclic.app/cart`,item)
return axios.post(`https://cyclicbackend.onrender.com/cart`,item)
}
const Star = ({ marked, starId }) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default function Home() {

const fetchData = async () => {
try {
const res = await axios.get(`https://busy-peplum-fawn.cyclic.app/products`);
const res = await axios.get(`https://cyclicbackend.onrender.com/products`);
setGetData(res.data);
} catch (err) {
return console.log(err);
Expand Down
4 changes: 2 additions & 2 deletions src/Pages/ItemDetails.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function ItemDetails(){
const { id } = useParams()
const [itemDetail, setItemDetail] = useState({})
useEffect(() => {
fetch(`https://busy-peplum-fawn.cyclic.app/products/${id}`)
fetch(`https://cyclicbackend.onrender.com/products/${id}`)
.then((res) => res.json())
.then((res) => setItemDetail(res))
.catch((err) => console.log(err))
Expand All @@ -51,7 +51,7 @@ export default function ItemDetails(){
}

const handleWishlist = (item) => {
return axios.post(`https://busy-peplum-fawn.cyclic.app/wishList`,item)
return axios.post(`https://cyclicbackend.onrender.com/wishList`,item)
}


Expand Down
10 changes: 5 additions & 5 deletions src/Pages/LipsCatPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const LipsCatPage = () => {
const fetchData = async () => {
try {
const res = await axios.get(
`https://busy-peplum-fawn.cyclic.app/products`
`https://cyclicbackend.onrender.com/products`
);
let data = res.data;

Expand All @@ -39,7 +39,7 @@ const LipsCatPage = () => {

async function onchangePrice(e){
try{
let res = await fetch(`https://busy-peplum-fawn.cyclic.app/products`);
let res = await fetch(`https://cyclicbackend.onrender.com/products`);
let data = await res.json();

let tempArray = data.filter((el) => {
Expand All @@ -66,7 +66,7 @@ const LipsCatPage = () => {

async function onchangeRatings(e){
try{
let res = await fetch(`https://busy-peplum-fawn.cyclic.app/products`);
let res = await fetch(`https://cyclicbackend.onrender.com/products`);
let data = await res.json();

let tempArray = data.filter((el) => {
Expand Down Expand Up @@ -103,7 +103,7 @@ const likeFuc = () => {
}

const handleWishlist = (item) => {
return axios.post(`https://busy-peplum-fawn.cyclic.app/wishList`,item)
return axios.post(`https://cyclicbackend.onrender.com/wishList`,item)
}


Expand All @@ -119,7 +119,7 @@ const addtoCart = () => {
}

const handleAddCart = (item) => {
return axios.post(`https://busy-peplum-fawn.cyclic.app/cart`,item)
return axios.post(`https://cyclicbackend.onrender.com/cart`,item)
}
const Star = ({ marked, starId }) => {
return (
Expand Down
4 changes: 2 additions & 2 deletions src/Pages/Payment.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function Payment() {
}
}
try {
const url = `https://busy-peplum-fawn.cyclic.app/cart/${id}`
const url = `https://cyclicbackend.onrender.com/cart/${id}`
const response = await fetch(url, settings)
const data = await response.json()
return data
Expand Down Expand Up @@ -127,7 +127,7 @@ export default function Payment() {

const fetchData = async () => {
try {
const res = await axios.get(`https://busy-peplum-fawn.cyclic.app/cart`);
const res = await axios.get(`https://cyclicbackend.onrender.com/cart`);
setItems(res.data);

} catch (err) {
Expand Down
10 changes: 5 additions & 5 deletions src/Pages/SkinCatPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const SkinCatPage = () => {
const fetchData = async () => {
try {
const res = await axios.get(
`https://busy-peplum-fawn.cyclic.app/products`
`https://cyclicbackend.onrender.com/products`
);
let data = res.data;

Expand All @@ -39,7 +39,7 @@ const SkinCatPage = () => {

async function onchangePrice(e){
try{
let res = await fetch(`https://busy-peplum-fawn.cyclic.app/products`);
let res = await fetch(`https://cyclicbackend.onrender.com/products`);
let data = await res.json();

let tempArray = data.filter((el) => {
Expand All @@ -66,7 +66,7 @@ const SkinCatPage = () => {

async function onchangeRatings(e){
try{
let res = await fetch(`https://busy-peplum-fawn.cyclic.app/products`);
let res = await fetch(`https://cyclicbackend.onrender.com/products`);
let data = await res.json();

let tempArray = data.filter((el) => {
Expand Down Expand Up @@ -103,7 +103,7 @@ const likeFuc = () => {
}

const handleWishlist = (item) => {
return axios.post(`https://busy-peplum-fawn.cyclic.app/wishList`,item)
return axios.post(`https://cyclicbackend.onrender.com/wishList`,item)
}


Expand All @@ -119,7 +119,7 @@ const addtoCart = () => {
}

const handleAddCart = (item) => {
return axios.post(`https://busy-peplum-fawn.cyclic.app/cart`,item)
return axios.post(`https://cyclicbackend.onrender.com/cart`,item)
}
const Star = ({ marked, starId }) => {
return (
Expand Down
4 changes: 2 additions & 2 deletions src/Pages/Wishlist.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { Box, Flex, Grid, GridItem,

const fetchData = async () => {
try {
const res = await axios.get(`https://busy-peplum-fawn.cyclic.app/wishList`);
const res = await axios.get(`https://cyclicbackend.onrender.com/wishList`);
setItems(res.data);

} catch (err) {
Expand All @@ -36,7 +36,7 @@ import { Box, Flex, Grid, GridItem,


const handleRemove = (id) => {
return axios.delete(`https://busy-peplum-fawn.cyclic.app/wishList/${id}`);
return axios.delete(`https://cyclicbackend.onrender.com/wishList/${id}`);
}

const removeFuc = (id) => {
Expand Down

0 comments on commit e59da08

Please sign in to comment.