Skip to content

Commit

Permalink
Change currency and fix razorpay amount
Browse files Browse the repository at this point in the history
  • Loading branch information
dhzdhd committed Nov 9, 2023
1 parent fb7e57d commit f7bbdf7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
26 changes: 13 additions & 13 deletions frontend/src/routes/home/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<div class="description">
<span class="category">Clothes</span>
<h5 class="title">{product.name}</h5>
<h4 class="price">${product.bidPrice}</h4>
<h4 class="price">{product.bidPrice}</h4>
</div>
</div>
</button>
Expand Down Expand Up @@ -86,7 +86,7 @@ section
display: flex
justify-content: center
height: 2.5rem
.search-select
background-color: vars.$accent
Expand All @@ -111,37 +111,37 @@ section
border: none
border-radius: 0rem 0.5rem 0.5rem 0rem
cursor: pointer
.container
display: grid
gap: 1rem
grid-template-columns: repeat(4, 1fr)
.product
height: 27rem
width: 20rem
padding: 10px 12px
border-radius: 25px
cursor: pointer
transition: 0.2s
border: none
background: linear-gradient(180deg, transparentize(white, 0.96) 0%, transparentize(vars.$accent, 0.9) 100%)
&:hover
box-shadow: 2px 2px 10px vars.$accent
img
width: 18.5rem
height:auto
border-radius: 20px
.description
Expand All @@ -151,12 +151,12 @@ section
.category
color: vars.$text
font-size: 12px
.title
color: vars.$inverted
font-size: 14px
.price
padding-top: 7px
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/home/[id=int]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
<div class="details">
<h4>Product Details</h4>
<span>{product.description}</span>
<h2 class="price">${product.bidPrice}</h2>
<h2 class="price">{product.bidPrice}</h2>
{#if product.available}
<div class="timer">
<span>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/home/payment/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const load: PageServerLoad = async ({ url, parent }) => {
const product = products.products.filter((e) => e.id === id)[0];

const response = await razorpay.orders.create({
amount: product.bidPrice,
amount: product.bidPrice * 100,
currency: 'INR'
});
return { product, id: response.id };
Expand Down

0 comments on commit f7bbdf7

Please sign in to comment.