Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More cleanup #906

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/components/grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,12 @@ class GridTable extends Component<GridTableProps> {
}
}

export default class Grid extends Component {
interface GridProps {
data: object;
psych_data: object;
}

export default class Grid extends Component<GridProps> {
state = {
value: '',
checked_boxes: ['alcohol', 'cannabis', 'cocaine', 'ketamine'],
Expand Down Expand Up @@ -200,9 +205,8 @@ export default class Grid extends Component {
<div class="w-full lg:text-lg font-semibold searchable-title text-md">{item.displayname}</div>
<img alt={item.img_capt}
class="rounded-lg align-middle h-auto leading-none shadow-lg"
decoding="async" loading="lazy" src={item.img.src}
width={item.img.attributes.width}
height={item.img.attributes.height}
decoding="async" loading="lazy"
{...item.img}
/>
</div>
</label>
Expand Down
7 changes: 4 additions & 3 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ for (let sub of substances) {
slug: sub.slug,
aka: sub.data.aka,
fam: sub.data.family_members,
img: await getImage({ src: sub.data.image_location, width: 220 }),
img: sub.data.image_location,
img_capt: sub.data.image_caption,
};
preact_data[sub.slug] = item;
Expand Down Expand Up @@ -106,6 +106,7 @@ for (let sub of substances) {
Low Risk No Synergy</span
>
</span>

<Grid psych_data={preact_data} data={data} client:visible />
<Disclaimer />
</BaseLayout>
<Grid psych_data={preact_data} data={data} client:visible />
<Disclaimer />
Loading