Skip to content

Commit

Permalink
feat: apply style to prices in others products rows
Browse files Browse the repository at this point in the history
  • Loading branch information
luisfbl committed Sep 15, 2024
1 parent 5d1d092 commit 7f70388
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 20 deletions.
5 changes: 4 additions & 1 deletion web/src/components/ProductList/UnpaginatedColumnProduct.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ export default function UnpaginatedColumnProduct(props: { item: any }) {
{ Star_image }
<p>({item.rating_quantity || "N/A "})</p>
</div>
<p className="price">R$ {item.price}</p>
<span className="price">
<span className="highlight">R$ {item.price}</span>/
<span className="quantity">{item.unit_quantity}{item.unit}</span>
</span>
</div>
</div>
)
Expand Down
3 changes: 2 additions & 1 deletion web/src/components/ProductList/UnpaginatedProduct.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ export default function UnpaginatedProduct(props: { item: any, i: number }) {
<p><ItemDist id={item.id}/></p>
</span>
<span className="price">
<p>R$ {item.price} {item.unit}</p>
<span className="highlight">R$ {item.price}</span>/
<span className="quantity">{item.unit_quantity}{item.unit}</span>
</span>
</div>
</a>
Expand Down
8 changes: 0 additions & 8 deletions web/src/components/page/home/Access.astro
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,4 @@ import "../../../style/pages/home.scss";
<a href="/access/signup">Criar conta</a>
</section>
</Fragment>

<script>
fetch(`/api/v1/users/@me`, {
credentials: "include"
}).then(request => {
request.json().then((data) => console.log(data)).catch(e => {})
}).catch(e => {})
</script>
</BaseLayout>
9 changes: 5 additions & 4 deletions web/src/components/page/home/client_home/Items.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,12 @@ function RenderItems(props: { store: string, star_image_src: string, location_im
/>
<div className="footer">
<span>
<Location_Img location_image_src={props.location_image_src} />
<p><ItemDist id={item.id} /></p>
<Location_Img location_image_src={props.location_image_src}/>
<p><ItemDist id={item.id}/></p>
</span>
<span className="price">
<p>R$ {item.price} {item.unit}</p>
<span className="highlight">R$ {item.price}</span>/
<span className="quantity">{item.unit_quantity}{item.unit}</span>
</span>
</div>
</a>
Expand All @@ -87,7 +88,7 @@ function RenderItems(props: { store: string, star_image_src: string, location_im
)
}

const Location_Img = memo(({ location_image_src }: any) => {
const Location_Img = memo(({location_image_src}: any) => {
return (
<img
src={location_image_src}
Expand Down
5 changes: 4 additions & 1 deletion web/src/components/page/home/client_home/ItemsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ export default function Items(props: { container_id: string, store: string, star
/>
<p>({item.rating_quantity || "N/A "})</p>
</div>
<p className="price">R$ {item.price}</p>
<span className="price">
<span className="highlight">R$ {item.price}</span>/
<span className="quantity">{item.unit_quantity}{item.unit}</span>
</span>
</div>
</div>
))
Expand Down
12 changes: 7 additions & 5 deletions web/src/style/layouts/unpaginatedproductlist.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,13 @@
}

.footer {
span {
p {
color: colors.$dark;
font-size: 0.75em;
font-weight: 600;
.price {
font-size: 0.75em;
font-weight: 600;
gap: 0.666px;

.highlight {
color: colors.$primary-dark;
}
}
}
Expand Down

0 comments on commit 7f70388

Please sign in to comment.