@vitnode/blog 1.2.0-canary.73 → 1.2.0-canary.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitnode/blog",
3
- "version": "1.2.0-canary.73",
3
+ "version": "1.2.0-canary.74",
4
4
  "description": "Blog plugin for VitNode, providing a blogging platform with Next.js and Hono.js.",
5
5
  "author": "VitNode Team",
6
6
  "license": "MIT",
@@ -41,7 +41,7 @@
41
41
  "sonner": "^2.0.7",
42
42
  "use-intl": "^4.13.0",
43
43
  "zod": "^4.4.3",
44
- "@vitnode/core": "1.2.0-canary.73"
44
+ "@vitnode/core": "1.2.0-canary.74"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@react-email/components": "^1.0.12",
@@ -53,7 +53,7 @@
53
53
  "eslint": "^10.5.0",
54
54
  "tsc-alias": "^1.8.17",
55
55
  "typescript": "^6.0.3",
56
- "@vitnode/config": "1.2.0-canary.73"
56
+ "@vitnode/config": "1.2.0-canary.74"
57
57
  },
58
58
  "scripts": {
59
59
  "build:plugins": "tsc && swc src -d dist --config-file .swcrc && tsc-alias -p tsconfig.json",
@@ -0,0 +1,47 @@
1
+ import type { Metadata } from "next";
2
+
3
+ import { I18nProvider } from "@vitnode/core/components/i18n-provider";
4
+ import { DataTableSkeleton } from "@vitnode/core/components/table/data-table";
5
+ import { HeaderContent } from "@vitnode/core/components/ui/header-content";
6
+ import { getTranslations } from "next-intl/server";
7
+ import dynamic from "next/dynamic";
8
+ import React from "react";
9
+
10
+ import { ActionsCategoriesAdmin } from "@/views/admin/categories/actions/actions";
11
+
12
+ const CategoriesAdminView = dynamic(async () =>
13
+ import("@/views/admin/categories/table/categories-admin-view").then(mod => ({
14
+ default: mod.CategoriesAdminView,
15
+ })),
16
+ );
17
+
18
+ export const generateMetadata = async (): Promise<Metadata> => {
19
+ const t = await getTranslations("@vitnode/blog.admin.nav");
20
+
21
+ return {
22
+ title: t("categories"),
23
+ };
24
+ };
25
+
26
+ export default async function CategoriesPage(
27
+ params: React.ComponentProps<typeof CategoriesAdminView>,
28
+ ) {
29
+ const [t, tNav] = await Promise.all([
30
+ getTranslations("@vitnode/blog.admin.categories"),
31
+ getTranslations("@vitnode/blog.admin.nav"),
32
+ ]);
33
+
34
+ return (
35
+ <I18nProvider namespaces={["@vitnode/blog.admin.categories"]}>
36
+ <div className="p-4">
37
+ <HeaderContent desc={t("desc")} h1={tNav("categories")}>
38
+ <ActionsCategoriesAdmin />
39
+ </HeaderContent>
40
+
41
+ <React.Suspense fallback={<DataTableSkeleton columns={4} />}>
42
+ <CategoriesAdminView {...params} />
43
+ </React.Suspense>
44
+ </div>
45
+ </I18nProvider>
46
+ );
47
+ }
@@ -0,0 +1,47 @@
1
+ import type { Metadata } from "next";
2
+
3
+ import { I18nProvider } from "@vitnode/core/components/i18n-provider";
4
+ import { DataTableSkeleton } from "@vitnode/core/components/table/data-table";
5
+ import { HeaderContent } from "@vitnode/core/components/ui/header-content";
6
+ import { getTranslations } from "next-intl/server";
7
+ import dynamic from "next/dynamic";
8
+ import React from "react";
9
+
10
+ import { ActionsPostsAdmin } from "@/views/admin/posts/actions/actions";
11
+
12
+ const PostsAdminView = dynamic(async () =>
13
+ import("@/views/admin/posts/table/posts-admin-view").then(mod => ({
14
+ default: mod.PostsAdminView,
15
+ })),
16
+ );
17
+
18
+ export const generateMetadata = async (): Promise<Metadata> => {
19
+ const t = await getTranslations("@vitnode/blog.admin.nav");
20
+
21
+ return {
22
+ title: t("posts"),
23
+ };
24
+ };
25
+
26
+ export default async function PostsPage(
27
+ params: React.ComponentProps<typeof PostsAdminView>,
28
+ ) {
29
+ const [t, tNav] = await Promise.all([
30
+ getTranslations("@vitnode/blog.admin.posts"),
31
+ getTranslations("@vitnode/blog.admin.nav"),
32
+ ]);
33
+
34
+ return (
35
+ <I18nProvider namespaces={["@vitnode/blog.admin.posts"]}>
36
+ <div className="p-4">
37
+ <HeaderContent desc={t("desc")} h1={tNav("posts")}>
38
+ <ActionsPostsAdmin />
39
+ </HeaderContent>
40
+
41
+ <React.Suspense fallback={<DataTableSkeleton columns={5} />}>
42
+ <PostsAdminView {...params} />
43
+ </React.Suspense>
44
+ </div>
45
+ </I18nProvider>
46
+ );
47
+ }