From c623356893fcab047f747858e2b0cb83ac91af6e Mon Sep 17 00:00:00 2001 From: Untone Date: Sat, 6 Jul 2024 04:29:59 +0300 Subject: [PATCH] editpage-fix --- src/context/authors.tsx | 4 ++-- src/routes/edit/[id]/(draft).tsx | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/context/authors.tsx b/src/context/authors.tsx index 4ba703cf..e2a6fec8 100644 --- a/src/context/authors.tsx +++ b/src/context/authors.tsx @@ -125,7 +125,7 @@ export const AuthorsProvider = (props: { children: JSX.Element }) => { return sortedTopAuthors }) - const loadAuthorsPage = async (args: QueryLoad_Authors_ByArgs): Promise => { + const loadAuthorsPaginated = async (args: QueryLoad_Authors_ByArgs): Promise => { try { const fetcher = await loadAuthors(args) const data = await fetcher() @@ -179,7 +179,7 @@ export const AuthorsProvider = (props: { children: JSX.Element }) => { addAuthors, addAuthor, loadAuthor, - loadAuthors: loadAuthorsPage, + loadAuthors: loadAuthorsPaginated, topAuthors, authorsByTopic, setAuthorsSort diff --git a/src/routes/edit/[id]/(draft).tsx b/src/routes/edit/[id]/(draft).tsx index c461eb13..3b82b3db 100644 --- a/src/routes/edit/[id]/(draft).tsx +++ b/src/routes/edit/[id]/(draft).tsx @@ -27,7 +27,7 @@ export const getContentTypeTitle = (layout: LayoutType) => { } } -export const EditPage = () => { +export default () => { const { t } = useLocalize() const { session } = useSession() const snackbar = useSnackbar() @@ -70,5 +70,3 @@ export const EditPage = () => { ) } - -export default EditPage