From 32ff8bce0c261c7927a109f76f4791f843077443 Mon Sep 17 00:00:00 2001 From: Kentai Radiquum Date: Fri, 23 Aug 2024 00:09:19 +0500 Subject: [PATCH] refactor: merge
from pages in to one in App.tsx --- app/App.tsx | 4 +- app/pages/Bookmarks.tsx | 4 +- app/pages/BookmarksCategory.tsx | 4 +- app/pages/Collections.tsx | 4 +- app/pages/CollectionsFull.tsx | 4 +- app/pages/CreateCollection.tsx | 4 +- app/pages/Favorites.tsx | 4 +- app/pages/History.tsx | 4 +- app/pages/Index.tsx | 4 +- app/pages/IndexCategory.tsx | 4 +- app/pages/Login.tsx | 158 ++++++++++++++++---------------- app/pages/Related.tsx | 4 +- app/pages/Release.tsx | 8 +- app/pages/Search.tsx | 4 +- app/pages/ViewCollection.tsx | 4 +- 15 files changed, 109 insertions(+), 109 deletions(-) diff --git a/app/App.tsx b/app/App.tsx index 4ab1838..d700fbe 100644 --- a/app/App.tsx +++ b/app/App.tsx @@ -60,7 +60,9 @@ export const App = (props) => { className={`${inter.className} overflow-x-hidden dark:bg-[#0d1117] dark:text-white`} > - {props.children} +
+ {props.children} +
{ diff --git a/app/pages/Bookmarks.tsx b/app/pages/Bookmarks.tsx index 035fdca..4dc00b1 100644 --- a/app/pages/Bookmarks.tsx +++ b/app/pages/Bookmarks.tsx @@ -39,7 +39,7 @@ export function BookmarksPage() { }, [authState, token]); return ( -
+ <> {authState === "loading" && (!watchingData || !plannedData || @@ -89,6 +89,6 @@ export function BookmarksPage() { content={abandonedData.content} /> )} -
+ ); } diff --git a/app/pages/BookmarksCategory.tsx b/app/pages/BookmarksCategory.tsx index b6aa369..12da4aa 100644 --- a/app/pages/BookmarksCategory.tsx +++ b/app/pages/BookmarksCategory.tsx @@ -79,7 +79,7 @@ export function BookmarksCategoryPage(props: any) { }, [authState, token]); return ( -
+ <>

{props.SectionTitleMapping[props.slug]} @@ -133,6 +133,6 @@ export function BookmarksCategoryPage(props: any) {

)} -
+ ); } diff --git a/app/pages/Collections.tsx b/app/pages/Collections.tsx index 07ba00b..2b20ad4 100644 --- a/app/pages/Collections.tsx +++ b/app/pages/Collections.tsx @@ -38,7 +38,7 @@ export function CollectionsPage() { }, [userStore.state, userStore.token]); return ( -
+ <> {userStore.state === "loading" && (!userCollections || !favoriteCollections) && (
@@ -63,6 +63,6 @@ export function CollectionsPage() { content={favoriteCollections.content} /> )} -
+ ); } diff --git a/app/pages/CollectionsFull.tsx b/app/pages/CollectionsFull.tsx index a541a36..486ca70 100644 --- a/app/pages/CollectionsFull.tsx +++ b/app/pages/CollectionsFull.tsx @@ -89,7 +89,7 @@ export function CollectionsFullPage(props: { }, [userStore.state, userStore.token]); return ( -
+ <> {content && content.length > 0 ? ( )} -
+ ); } diff --git a/app/pages/CreateCollection.tsx b/app/pages/CreateCollection.tsx index cc98189..2bf3828 100644 --- a/app/pages/CreateCollection.tsx +++ b/app/pages/CreateCollection.tsx @@ -225,7 +225,7 @@ export const CreateCollectionPage = () => { } return ( -
+ <>

{edit ? "Редактирование коллекции" : "Создание коллекции"} @@ -400,7 +400,7 @@ export const CreateCollectionPage = () => { width={600} height={337} /> -

+ ); }; diff --git a/app/pages/Favorites.tsx b/app/pages/Favorites.tsx index a53a426..b2917cb 100644 --- a/app/pages/Favorites.tsx +++ b/app/pages/Favorites.tsx @@ -76,7 +76,7 @@ export function FavoritesPage() { }, [authState, token]); return ( -
+ <>

Избранное @@ -128,6 +128,6 @@ export function FavoritesPage() {

)} -
+ ); } diff --git a/app/pages/History.tsx b/app/pages/History.tsx index 5807e8a..cab1eb3 100644 --- a/app/pages/History.tsx +++ b/app/pages/History.tsx @@ -68,7 +68,7 @@ export function HistoryPage() { }, [authState, token]); return ( -
+ <> {content && content.length > 0 ? ( <> @@ -95,6 +95,6 @@ export function HistoryPage() {

В истории пока ничего нет...

)} -
+ ); } diff --git a/app/pages/Index.tsx b/app/pages/Index.tsx index 4647ef0..4af1680 100644 --- a/app/pages/Index.tsx +++ b/app/pages/Index.tsx @@ -40,7 +40,7 @@ export function IndexPage() { }, [token]); return ( -
+ <> {lastReleasesData ? ( Ошибка загрузки контента... )} -
+ ); } diff --git a/app/pages/IndexCategory.tsx b/app/pages/IndexCategory.tsx index d474b64..456ed85 100644 --- a/app/pages/IndexCategory.tsx +++ b/app/pages/IndexCategory.tsx @@ -48,7 +48,7 @@ export function IndexCategoryPage(props) { // if (error) return
failed to load
; return ( -
+ <> {content && content.length > 0 ? ( Загрузить ещё -
+ ); } diff --git a/app/pages/Login.tsx b/app/pages/Login.tsx index 65f7534..27507c2 100644 --- a/app/pages/Login.tsx +++ b/app/pages/Login.tsx @@ -52,89 +52,87 @@ export function LoginPage() { }, [userStore.user]); return ( -
-
-
-
-
-

- Вход в аккаунт Anixart -

-
-
- - setLogin(e.target.value)} - required={true} - /> -
-
- - setPassword(e.target.value)} - /> -
-
-
-
- setRemember(e.target.checked)} - /> -
-
- -
+
+
+
+
+

+ Вход в аккаунт Anixart +

+ +
+ + setLogin(e.target.value)} + required={true} + /> +
+
+ + setPassword(e.target.value)} + /> +
+
+
+
+ setRemember(e.target.checked)} + /> +
+
+
- - -
+
+ +
-
-
+ + ); } diff --git a/app/pages/Related.tsx b/app/pages/Related.tsx index 9908e46..2785576 100644 --- a/app/pages/Related.tsx +++ b/app/pages/Related.tsx @@ -57,7 +57,7 @@ export function RelatedPage(props: {id: number|string, title: string}) { }, [scrollPosition]); return ( -
+ <>

Франшиза {props.title} @@ -86,6 +86,6 @@ export function RelatedPage(props: {id: number|string, title: string}) { Загрузить ещё )} -

+ ); } diff --git a/app/pages/Release.tsx b/app/pages/Release.tsx index 0661e76..d649706 100644 --- a/app/pages/Release.tsx +++ b/app/pages/Release.tsx @@ -46,7 +46,7 @@ export const ReleasePage = (props: any) => { }, [data]); return data ? ( -
+ <>
{ />
-
+ ) : ( -
+
-
+ ); }; diff --git a/app/pages/Search.tsx b/app/pages/Search.tsx index ffad084..1ba6922 100644 --- a/app/pages/Search.tsx +++ b/app/pages/Search.tsx @@ -90,7 +90,7 @@ export function SearchPage() { if (error) return
failed to load
; return ( -
+ <>
)} -
+ ); } diff --git a/app/pages/ViewCollection.tsx b/app/pages/ViewCollection.tsx index 2460862..21df85c 100644 --- a/app/pages/ViewCollection.tsx +++ b/app/pages/ViewCollection.tsx @@ -89,7 +89,7 @@ export const ViewCollectionPage = (props: { id: number }) => { }, [scrollPosition]); return ( -
+ <> {collectionInfoIsLoading ? (
@@ -150,6 +150,6 @@ export const ViewCollectionPage = (props: { id: number }) => { ) )} -
+ ); };