Skip to content

Commit

Permalink
small tidy-ups
Browse files Browse the repository at this point in the history
  • Loading branch information
fmtabbara committed Jan 2, 2025
1 parent ccb44ee commit 934874c
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 27 deletions.
Binary file added explorer-nextjs/public/images/placeholder.webp
Binary file not shown.
2 changes: 2 additions & 0 deletions explorer-nextjs/src/app/(pages)/onboarding/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ export default async function BlogPage({
</ContentLayout>
);
} catch (error) {
console.log(error);

return (
<ContentLayout>
<Wrapper>
Expand Down
1 change: 0 additions & 1 deletion explorer-nextjs/src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
html,
body {
max-width: 100vw;
overflow-x: hidden;
}

a {
Expand Down
26 changes: 3 additions & 23 deletions explorer-nextjs/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import ExplorerHeroCard from "@/components/cards/ExplorerHeroCard";
import BlogArticlesCards from "@/components/blogs/BlogArticleCards";
import CardSkeleton from "@/components/cards/Skeleton";
import { ContentLayout } from "@/components/contentLayout/ContentLayout";
import SectionHeading from "@/components/headings/SectionHeading";
import Gateway from "@/components/icons/Gateway";
import { CurrentEpochCard } from "@/components/landingPageComponents/CurrentEpochCard";
import { NetworkStakeCard } from "@/components/landingPageComponents/NetworkStakeCard";
import { NoiseCard } from "@/components/landingPageComponents/NoiseCard";
Expand All @@ -14,7 +13,7 @@ import { Stack, Typography } from "@mui/material";
import Grid from "@mui/material/Grid2";
import { Suspense } from "react";

export default function Home() {
export default async function Home() {
return (
<ContentLayout>
<Stack gap={5}>
Expand Down Expand Up @@ -61,26 +60,7 @@ export default function Home() {
<Grid size={12}>
<SectionHeading title="Onboarding" />
</Grid>
<Grid size={6}>
<ExplorerHeroCard
label="Onboarding"
title="How to select Nym vpn gateway?"
description="Stake your tokens to well performing mix nodes, and earn a share of operator rewards!"
image={<Gateway />}
link={"/onboarding"}
sx={{ width: "100%" }}
/>
</Grid>
<Grid size={6}>
<ExplorerHeroCard
label="Onboarding"
title="How to select Nym vpn gateway?"
description="Stake your tokens to well performing mix nodes, and earn a share of operator rewards!"
image={<Gateway />}
link={"/onboarding"}
sx={{ width: "100%" }}
/>
</Grid>
<BlogArticlesCards limit={2} />
</Grid>
</ContentLayout>
);
Expand Down
4 changes: 4 additions & 0 deletions explorer-nextjs/src/components/blogs/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ import type data from "@/data/blog-template.json";

type BlogArticle = typeof data;

export type BlogArticleWithLink = BlogArticle & {
link: string;
};

export default BlogArticle;
12 changes: 9 additions & 3 deletions explorer-nextjs/src/components/cards/ExplorerHeroCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
type SxProps,
Typography,
} from "@mui/material";
import Image from "next/image";
import { Link } from "../muiLink";

const cardStyles = {
Expand All @@ -27,14 +28,14 @@ const ExplorerHeroCard = ({
title,
label,
description,
image,
icon,
link,
sx,
}: {
title: string;
label: string;
description: string;
image: React.ReactNode;
icon: string;
link: string;
sx?: SxProps;
}) => {
Expand All @@ -53,7 +54,12 @@ const ExplorerHeroCard = ({
/>
<CardContent sx={cardContentStyles}>
<Stack spacing={4}>
{image}
<Image
src={icon}
alt={"explorer-blog-image"}
width={84}
height={84}
/>
<Typography variant="h2">{title}</Typography>
<Typography variant="body3">{description}</Typography>
</Stack>
Expand Down

0 comments on commit 934874c

Please sign in to comment.