Skip to content

Commit

Permalink
Turn card into link; allow image to be squished on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
SheepTester committed Aug 2, 2023
1 parent 0e0106c commit a6eea2c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/components/store/ItemCard/style.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@
display: flex;
flex-direction: column;
gap: 1rem;
max-width: 400px;
overflow: hidden;
padding-bottom: 1rem;
width: 400px;

.imageWrapper {
// Enforce a square image while allowing the card to be squished on mobile
padding-bottom: 100%;
position: relative;
}

.details {
display: flex;
Expand Down
1 change: 1 addition & 0 deletions src/components/store/ItemCard/style.module.scss.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export type Styles = {
cost: string;
details: string;
diamond: string;
imageWrapper: string;
itemCard: string;
outOfStock: string;
title: string;
Expand Down
11 changes: 10 additions & 1 deletion src/pages/store/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
import { ItemCard } from '@/components/store';
import withAccessType from '@/lib/hoc/withAccessType';
import { PermissionService } from '@/lib/services';
import { GetServerSideProps } from 'next';

const StoreHomePage = () => {
return <h1>Store Home Page</h1>;
return (
<ItemCard
image="https://acmucsd.s3.us-west-1.amazonaws.com/portal/profiles/07789a16-8326-4edc-ad2d-fc6193cd1ee3.jpg"
cost={42069}
title="Nishant (not for sale)"
href="/leaderboard"
inStock={false}
/>
);
};

export default StoreHomePage;
Expand Down

1 comment on commit a6eea2c

@SheepTester
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

man, i committed the wrong index.tsx

Please sign in to comment.