feat: replace eslint and prettier with biome
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
export function EmptyState() {
|
||||
return (
|
||||
<div className="mx-5 flex flex-col items-center">
|
||||
<div className="font-bold">
|
||||
I haven't post anything yet! So here's a pic of my cat
|
||||
</div>
|
||||
<img src="/cat.jpg" className="rounded-md" />
|
||||
</div>
|
||||
);
|
||||
}
|
@@ -1,8 +1,11 @@
|
||||
export function Notbyai() {
|
||||
return (
|
||||
<div className="flex flex-col items-center">
|
||||
<a href="https://notbyai.fyi/" target="_blank">
|
||||
<img src="https://user-images.githubusercontent.com/62137266/225653923-a69103f5-b318-4e52-9ea1-95b61d388366.svg" />
|
||||
<a href="https://notbyai.fyi/" target="_blank" rel="noreferrer">
|
||||
<img
|
||||
alt="nobyai logo"
|
||||
src="https://user-images.githubusercontent.com/62137266/225653923-a69103f5-b318-4e52-9ea1-95b61d388366.svg"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { SerializeFrom } from "@remix-run/node";
|
||||
import type { SerializeFrom } from "@remix-run/node";
|
||||
import { Link } from "@remix-run/react";
|
||||
import { useFormattedDate } from "~/hooks";
|
||||
import type { Post } from "~/utils/posts.server";
|
||||
|
@@ -45,9 +45,10 @@ export default function App() {
|
||||
/>
|
||||
<script
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `window.plausible = window.plausible || function(){(window.plausible.q = window.plausible.q || []).push(arguments)}`,
|
||||
__html:
|
||||
"window.plausible = window.plausible || function(){(window.plausible.q = window.plausible.q || []).push(arguments)}",
|
||||
}}
|
||||
></script>
|
||||
/>
|
||||
</head>
|
||||
<Body>
|
||||
<Outlet />
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { useLoaderData } from "@remix-run/react";
|
||||
import { EmptyState } from "~/components/EmptyState";
|
||||
import { PostPreview } from "~/components/PostPreview";
|
||||
import { Title } from "~/components/Title";
|
||||
import { findPosts } from "~/utils/posts.server";
|
||||
@@ -19,15 +18,11 @@ export default function Blog() {
|
||||
return (
|
||||
<>
|
||||
<Title>Here I blog about whatever get my attention</Title>
|
||||
{posts.length > 0 ? (
|
||||
<div className="flex flex-col items-center space-y-5">
|
||||
{posts.map((post, i) => (
|
||||
<PostPreview {...post} key={i} />
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<EmptyState />
|
||||
)}
|
||||
<div className="flex flex-col items-center space-y-5">
|
||||
{posts.map((post) => (
|
||||
<PostPreview {...post} key={post.title} />
|
||||
))}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
@tailwind utilities;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { remarkCodeHike } from "@code-hike/mdx";
|
||||
import { readdir, readFile } from "fs/promises";
|
||||
import { bundleMDX } from "mdx-bundler";
|
||||
import path from "path";
|
||||
import { readdir, readFile } from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
|
||||
type FrontMatter = {
|
||||
title: string;
|
||||
@@ -41,7 +41,7 @@ export type Post = Omit<FrontMatter, "published"> & {
|
||||
};
|
||||
|
||||
export const findPosts = async () => {
|
||||
const files = await readdir(`posts`);
|
||||
const files = await readdir("posts");
|
||||
const posts: Post[] = [];
|
||||
for (const file of files.filter((file) => file.endsWith(".mdx"))) {
|
||||
const filePath = path.join(process.cwd(), `posts/${file}`);
|
||||
|
Reference in New Issue
Block a user