Move types definition under src directory

This commit is contained in:
Sat Naing
2022-09-22 20:39:51 +06:30
parent f367e05793
commit 9e351fe26d
7 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
import Datetime from "./Datetime";
import type { Frontmatter } from "@utils/types";
import type { Frontmatter } from "src/types";
export interface Props {
href?: string;
+1 -1
View File
@@ -2,7 +2,7 @@
import Fuse from "fuse.js";
import { useEffect, useState } from "react";
import Card from "@components/Card";
import type { Frontmatter } from "@utils/types";
import type { Frontmatter } from "src/types";
interface Props {
searchList: {
+1 -1
View File
@@ -1,5 +1,5 @@
import rss from "@astrojs/rss";
import type { Frontmatter } from "@utils/types";
import type { Frontmatter } from "src/types";
import type { MarkdownInstance } from "astro";
const postImportResult = import.meta.glob<MarkdownInstance<Frontmatter>>(
View File
+1 -1
View File
@@ -1,6 +1,6 @@
import type { MarkdownInstance } from "astro";
import { slufigyAll } from "./slugify";
import type { Frontmatter } from "./types";
import type { Frontmatter } from "../types";
const getPostsByTag = (posts: MarkdownInstance<Frontmatter>[], tag: string) =>
posts.filter((post) => slufigyAll(post.frontmatter.tags).includes(tag));
+1 -1
View File
@@ -1,5 +1,5 @@
import type { MarkdownInstance } from "astro";
import type { Frontmatter } from "./types";
import type { Frontmatter } from "../types";
const getSortedPosts = (posts: MarkdownInstance<Frontmatter>[]) =>
posts.sort(
+1 -1
View File
@@ -1,6 +1,6 @@
import slugify from "./slugify";
import type { MarkdownInstance } from "astro";
import type { Frontmatter } from "./types";
import type { Frontmatter } from "../types";
const getUniqueTags = (posts: MarkdownInstance<Frontmatter>[]) => {
let tags: string[] = [];