Jacky Zhao
2023-08-23 cde1e26129f8cd6b183ccc1c35a06f76dedeff9c
quartz/components/RecentNotes.tsx
@@ -24,14 +24,14 @@
export default ((userOpts?: Partial<Options>) => {
  const opts = { ...defaultOptions, ...userOpts }
  function RecentNotes(props: QuartzComponentProps) {
    const { allFiles, fileData } = props
    const pages = allFiles.filter(opts.filter).sort(opts.sort).slice(0, opts.limit)
    const { allFiles, fileData, displayClass } = props
    const pages = allFiles.filter(opts.filter).sort(opts.sort)
    const remaining = Math.max(0, pages.length - opts.limit)
    return (
      <div class="recent-notes">
      <div class={`recent-notes ${displayClass}`}>
        <h3>{opts.title}</h3>
        <ul class="recent-ul">
          {pages.map((page) => {
          {pages.slice(0, opts.limit).map((page) => {
            const title = page.frontmatter?.title
            const tags = page.frontmatter?.tags ?? []