feat: account

This commit is contained in:
Ivan Rezchikov
2026-06-23 15:32:52 +03:00
parent 64923cd1b2
commit 58ec75c948
18 changed files with 205 additions and 29 deletions
+2 -2
View File
@@ -137,7 +137,7 @@ export default function Editor({ page, initialBlocks = [], onChange }: EditorPro
return (
<div className="flex flex-col gap-10">
<FieldSet>
<h2 className="underline underline-offset-8 decoration-2 mb-6">Meta</h2>
<h2 className=" mb-6">Meta</h2>
<FieldGroup>
<Field>
<FieldLabel htmlFor="title">Title</FieldLabel>
@@ -215,7 +215,7 @@ export default function Editor({ page, initialBlocks = [], onChange }: EditorPro
</FieldSet>
<div className="flex flex-col gap-1">
<h2 className="underline underline-offset-8 decoration-2 mb-6">Content</h2>
<h2 className=" mb-6">Content</h2>
{blocks.length === 0 && (
<p className="text-sm text-muted-foreground">No blocks yet. Add one below.</p>
)}
+1 -4
View File
@@ -2,7 +2,6 @@ import Image from "next/image";
import { Button } from "./ui/button";
import login from "@/app/actions/login";
import { getCurrentUser } from "@/lib/user";
import logout from "@/app/actions/logout";
import Link from "next/link";
import { getNavLinks } from "@/lib/navlinks/repository";
@@ -30,9 +29,7 @@ export default async function Header() {
</div>
{
user ? (
<form action={logout}>
<Button size="lg" type="submit">{`Logout from ${user.firstName} ${user.secondName}`}</Button>
</form>
<Link href="/account"><Button>Account</Button></Link>
) : (
<form action={login}>
<Button size="lg" type="submit">Sign in with Kotosoft ID</Button>
+1 -1
View File
@@ -8,7 +8,7 @@ export function NewsCard({ news }: { news: Page }) {
return (
<div className="flex flex-col gap-2">
<Link href={`/news/${news.slug}`} className="w-max">
<h2 className="hover:underline underline-offset-8 decoration-2 duration-200 cursor-pointer">{news.title}</h2>
<h2 className="hover: duration-200 cursor-pointer">{news.title}</h2>
</Link>
<div className="flex flex-row gap-8 items-center">
<p className="flex gap-2 items-center"><CalendarIcon size={16} />{formatDate(news.publishedAt)}</p>