Feat: 新增评论组件,细化通知组件样式,引入环境变量,替换图标组件
This commit is contained in:
+3
-1
@@ -8,6 +8,8 @@ import { getFirstImage, years } from "~/utils/note";
|
||||
|
||||
import type { Route } from "./+types/note";
|
||||
|
||||
const { APP_APIURL } = import.meta.env;
|
||||
|
||||
export function meta({}: Route.MetaArgs) {
|
||||
return [
|
||||
{ title: siteTitle("日记") },
|
||||
@@ -20,7 +22,7 @@ export async function loader({ request }: Route.LoaderArgs) {
|
||||
const year = url.searchParams.get("year") || new Date().getFullYear();
|
||||
const page = url.searchParams.get("page") || 1;
|
||||
|
||||
const note = await fetch(`https://paul.ren/api/note/?page=${page}&year=${year}`).then((res) => res.json()) as API.PageResponse<API.Note.INoteData[]>;
|
||||
const note = await fetch(`${APP_APIURL}/api/note/?page=${page}&year=${year}`).then((res) => res.json()) as API.PageResponse<API.Note.INoteData[]>;
|
||||
|
||||
return { note, page, year };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user