Skip to content

Commit

Permalink
Fix: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
esadek committed Dec 21, 2024
1 parent 464635b commit 9c0d4eb
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 19 deletions.
3 changes: 1 addition & 2 deletions astro.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// @ts-check
import { defineConfig } from "astro/config";
import tailwind from "@astrojs/tailwind";
import { defineConfig } from "astro/config";

export default defineConfig({
site: "https://emilsadek.com",
Expand Down
6 changes: 3 additions & 3 deletions src/components/Card.astro
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
interface Props {
title: string;
body: string;
href: string;
title: string;
body: string;
href: string;
}
const { href, title, body } = Astro.props;
Expand Down
10 changes: 5 additions & 5 deletions src/components/Navbar.astro
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
---
import Email from "./icons/Email.astro"
import Email from "./icons/Email.astro";
import GitHub from "./icons/GitHub.astro";
import LinkedIn from "./icons/LinkedIn.astro";
const links = [
{
icon: GitHub,
href: "https://github.com/esadek",
text: "GitHub"
text: "GitHub",
},
{
icon: LinkedIn,
href: "https://www.linkedin.com/in/emil-sadek",
text: "LinkedIn"
text: "LinkedIn",
},
{
icon: Email,
href: "mailto:[email protected]",
text: "Contact"
}
text: "Contact",
},
];
---

Expand Down
4 changes: 2 additions & 2 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
import Navbar from '../components/Navbar.astro';
import Navbar from "../components/Navbar.astro";
interface Props {
title: string;
title: string;
}
const { title } = Astro.props;
Expand Down
12 changes: 6 additions & 6 deletions src/pages/blog/[...slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { type CollectionEntry, getCollection } from "astro:content";
import BlogPost from "../../layouts/BlogPost.astro";
export async function getStaticPaths() {
const posts = await getCollection("blog");
return posts.map((post) => ({
params: { slug: post.slug },
props: post,
}));
const posts = await getCollection("blog");
return posts.map((post) => ({
params: { slug: post.slug },
props: post,
}));
}
type Props = CollectionEntry<'blog'>;
type Props = CollectionEntry<"blog">;
const post = Astro.props;
const { Content } = await post.render();
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import { getCollection } from "astro:content";
import Layout from "../layouts/Layout.astro";
import Card from "../components/Card.astro";
import Layout from "../layouts/Layout.astro";
const blogPosts = await getCollection("blog");
---
Expand Down

0 comments on commit 9c0d4eb

Please sign in to comment.