feat: add table components and admin article list with skeleton loading
Some checks failed
Build and Test / run-test (20.x) (push) Failing after 1m30s

This commit is contained in:
2026-04-13 20:51:20 -03:00
parent 79e6fae0f9
commit c938974d2b
14 changed files with 1054 additions and 34 deletions

View File

@@ -10,6 +10,7 @@ import * as service from '@/lib/feature/article/article.service';
import { getSessionData } from '@/lib/session/session-storage';
import { TypedResult, wrap } from '@/utils/types/results';
import { UUIDv4 } from '@/utils/types/uuid';
import { revalidatePath } from 'next/cache';
export const getArticleByExternalId: (
externalId: UUIDv4
@@ -82,6 +83,7 @@ export const updateArticle: (
const result = await service.updateArticle(articleId, article);
if (!result.ok) throw result.error;
revalidatePath('/admin');
return result.value;
}
);
@@ -97,4 +99,5 @@ export const deleteArticle: (articleId: string) => Promise<TypedResult<void>> =
const result = await service.deleteArticle(articleId);
if (!result.ok) throw result.error;
revalidatePath('/admin');
});