Skip to content

Commit

Permalink
Fix errors & warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Einlar committed May 21, 2024
1 parent c548188 commit a1a067f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
3 changes: 1 addition & 2 deletions src/components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import NoteCard from "@components/NoteCard";
import type { CollectionEntry } from "astro:content";

export type SearchItem = {
title: string;
description: string;
description: string | undefined;
data: CollectionEntry<"notes">["data"];
slug: string;
};
Expand Down
4 changes: 2 additions & 2 deletions src/layouts/CourseNotes.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Layout from "@layouts/Layout.astro";
import Main from "@layouts/Main.astro";
import Header from "@components/Header.astro";
import Footer from "@components/Footer.astro";
import Card from "@components/Card";
import NoteCard from "@components/NoteCard";
import Pagination from "@components/Pagination.astro";
import { SITE } from "@config";
Expand All @@ -31,7 +31,7 @@ const { currentPage, totalPages, paginatedPosts, course, courseName } =
<ul>
{
paginatedPosts.map(({ data, slug }) => (
<Card href={`/notes/${slug}/`} frontmatter={data} />
<NoteCard href={`/notes/${slug}/`} frontmatter={data} />
))
}
</ul>
Expand Down
13 changes: 6 additions & 7 deletions src/layouts/PostDetails.astro
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
---
import Layout from "@layouts/Layout.astro";
import Header from "@components/Header.astro";
import Footer from "@components/Footer.astro";
import Tag from "@components/Tag.astro";
import Datetime from "@components/Datetime";
import type { CollectionEntry } from "astro:content";
import { slugifyStr } from "@utils/slugify";
import Footer from "@components/Footer.astro";
import Header from "@components/Header.astro";
import ShareLinks from "@components/ShareLinks.astro";
import { SITE } from "@config";
import Layout from "@layouts/Layout.astro";
import { slugifyStr } from "@utils/slugify";
import type { CollectionEntry } from "astro:content";
export interface Props {
post: CollectionEntry<"blog">;
Expand All @@ -23,7 +22,7 @@ const {
canonicalURL,
pubDatetime,
modDatetime,
tags,
// tags,
} = post.data;
const { Content } = await post.render();
Expand Down
1 change: 0 additions & 1 deletion src/pages/search.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const sortedNotes = getSortedNotes(notes);
// List of items to search in
const searchList = sortedNotes.map(({ data, slug }) => ({
title: data.title,
description: data.description,
data,
slug,
Expand Down

0 comments on commit a1a067f

Please sign in to comment.