From 2db04ef8efe89dd071ee6833f945b8c70a078465 Mon Sep 17 00:00:00 2001 From: olexh Date: Wed, 10 Apr 2024 02:37:33 +0300 Subject: [PATCH] add notification settings, fix minor bugs, format code by prettier --- app/(api)/auth/activate/[token]/route.ts | 3 +- app/(api)/auth/google/route.ts | 4 +- app/(api)/auth/reset/[token]/route.ts | 4 +- .../components/anime-list/anime-list.tsx | 2 +- .../components/anime-list-skeleton.tsx | 1 - .../components/anime-list/index.ts | 2 +- .../components/navbar/_components/search.tsx | 3 +- .../(animeList)/components/navbar/index.ts | 2 +- .../(animeList)/components/navbar/navbar.tsx | 1 - app/(pages)/anime/(animeList)/layout.tsx | 3 +- .../[slug]/(animeDetails)/comments/page.tsx | 2 +- app/(pages)/anime/[slug]/anime.schema.ts | 6 +- app/(pages)/anime/[slug]/components/about.tsx | 8 +- .../[slug]/components/actions/actions.tsx | 5 +- .../anime/[slug]/components/actions/index.ts | 2 +- .../anime/[slug]/components/characters.tsx | 6 +- app/(pages)/anime/[slug]/components/cover.tsx | 2 +- .../anime/[slug]/components/description.tsx | 5 - .../components/ui/following-item.tsx | 4 +- .../components/followings/followings.tsx | 1 - .../anime/[slug]/components/franchise.tsx | 5 +- app/(pages)/anime/[slug]/components/links.tsx | 2 +- app/(pages)/anime/[slug]/components/media.tsx | 6 +- app/(pages)/anime/[slug]/components/staff.tsx | 5 +- app/(pages)/anime/[slug]/components/title.tsx | 4 +- .../watch-stats/components/score.tsx | 1 - .../watch-stats/components/watchlist.tsx | 1 - app/(pages)/anime/[slug]/page.tsx | 3 +- .../characters/[slug]/components/anime.tsx | 3 +- .../[slug]/components/description.tsx | 5 - .../characters/[slug]/components/title.tsx | 6 - .../characters/[slug]/components/voices.tsx | 5 +- app/(pages)/characters/[slug]/layout.tsx | 12 +- .../components/collection-list.tsx | 2 +- .../components/collection-sort.tsx | 1 - .../components/ui/collection-item.tsx | 7 +- .../collections/(collections)/page.tsx | 27 +- .../components/collection-groups.tsx | 1 - .../components/collection-info.tsx | 20 +- app/(pages)/collections/[reference]/page.tsx | 12 +- .../collections/[reference]/update/page.tsx | 9 +- .../collection-grid/collection-grid.tsx | 4 +- .../components/ui/sortable-card.tsx | 12 +- .../new/components/collection-grid/index.ts | 2 +- .../components/collection-settings/index.ts | 2 +- .../new/components/collection-title.tsx | 1 - app/(pages)/collections/new/page.tsx | 8 +- .../edit/[editId]/components/actions.tsx | 8 - app/(pages)/edit/[editId]/layout.tsx | 10 +- app/(pages)/edit/[editId]/page.tsx | 5 +- app/(pages)/edit/[editId]/update/page.tsx | 5 +- .../components/content/components/details.tsx | 10 +- .../edit/components/content/content.tsx | 3 +- app/(pages)/edit/components/content/index.ts | 2 +- .../components/tags-modal.tsx | 5 +- .../edit-description/edit-description.tsx | 3 +- .../edit/components/edit-description/index.ts | 2 +- app/(pages)/edit/components/edit-form.tsx | 5 +- .../edit-list/components/edit-head.tsx | 4 +- .../edit-list/components/edit-skeleton.tsx | 1 - .../edit/components/edit-list/edit-list.tsx | 5 +- app/(pages)/edit/components/edit-view.tsx | 1 - .../edit/components/ui/edit-status.tsx | 4 +- app/(pages)/edit/components/ui/list-param.tsx | 3 - .../edit/content/components/content-list.tsx | 6 - app/(pages)/edit/content/page.tsx | 1 - app/(pages)/edit/layout.tsx | 2 +- .../edit/new/components/rules-alert.tsx | 10 +- app/(pages)/edit/new/page.tsx | 6 +- app/(pages)/edit/page.tsx | 3 +- app/(pages)/layout.tsx | 9 +- .../people/[slug]/components/anime.tsx | 6 +- .../people/[slug]/components/characters.tsx | 13 +- .../people/[slug]/components/title.tsx | 6 - app/(pages)/people/[slug]/layout.tsx | 10 +- .../schedule/components/schedule-list.tsx | 6 +- .../components/ui/schedule-watch-button.tsx | 11 +- app/(pages)/schedule/page.tsx | 2 +- .../components/activation-alert.tsx | 6 - .../components/collections/collections.tsx | 9 +- .../components/ui/collection-item.tsx | 8 +- .../components/collections/index.ts | 2 +- .../favorites/_components/anime.tsx | 2 +- .../favorites/_components/characters.tsx | 2 +- .../favorites/_components/collections.tsx | 2 +- .../history/components/history-modal.tsx | 4 +- .../history/components/ui/history-item.tsx | 4 +- .../[username]/components/history/history.tsx | 4 +- .../u/[username]/components/history/index.ts | 2 +- .../u/[username]/components/list-stats.tsx | 2 +- .../_components/ui/activity-item.tsx | 2 +- .../activity-stats/activity-stats.tsx | 3 +- .../_components/watchhour-stats.tsx | 1 - .../[username]/components/statistics/index.ts | 2 +- .../components/statistics/statistics.tsx | 2 +- .../components/ui/follow-user-item.tsx | 29 +- app/(pages)/u/[username]/favorites/page.tsx | 3 +- app/(pages)/u/[username]/layout.tsx | 10 +- .../components/list/components/grid-view.tsx | 2 +- .../list/components/ui/episodes-cell.tsx | 1 - .../list/components/ui/media-cell.tsx | 2 +- .../[username]/list/components/list/list.tsx | 12 +- .../list/components/status-combobox.tsx | 5 +- .../list/components/view-combobox.tsx | 5 +- app/(pages)/u/[username]/list/page.tsx | 6 +- app/(pages)/u/[username]/page.tsx | 13 +- app/(sitemaps)/sitemap.xml/route.ts | 11 +- app/globals.css | 15 +- app/layout.tsx | 1 - app/not-found.tsx | 7 +- components/auth-gate.tsx | 8 +- components/comments/comments.tsx | 1 - .../comments/components/comment-input.tsx | 6 - .../comments/components/comment-menu.tsx | 26 +- .../comments/components/comment-vote.tsx | 6 - components/comments/components/comment.tsx | 1 - components/comments/components/comments.tsx | 10 +- components/comments/index.ts | 2 +- components/edit-button.tsx | 12 +- .../components/context-menu-overlay.tsx | 13 +- .../entry-card/components/watch-status.tsx | 7 +- components/filters/anime-filters.tsx | 16 +- .../filters/components/filters-not-found.tsx | 1 - .../filters/components/ui/badge-filter.tsx | 2 +- components/filters/edit-filters.tsx | 2 +- components/markdown/editor/MD-editor.tsx | 1 - .../editor/directives/spoiler-directive.tsx | 2 +- .../editor/initialized-MDX-editor.tsx | 16 +- .../markdown/editor/toolbar/bold-button.tsx | 23 +- .../markdown/editor/toolbar/link-button.tsx | 5 +- .../markdown/editor/toolbar/link-dialog.tsx | 2 +- .../editor/toolbar/spoiler-button.tsx | 5 +- .../editor/toolbar/underline-button.tsx | 2 +- components/markdown/viewer/MD-viewer.tsx | 12 +- .../markdown/viewer/components/link.tsx | 5 +- .../markdown/viewer/components/spoiler.tsx | 11 +- .../viewer/plugins/remark-mentions.tsx | 2 +- components/modal-manager.tsx | 29 ++ components/modals/anime-filters-modal.tsx | 2 +- components/modals/auth-modal/auth-modal.tsx | 7 +- .../components/forgot-password-form.tsx | 2 +- .../auth-modal/components/login-form.tsx | 14 +- .../components/password-confirm-form.tsx | 9 +- .../auth-modal/components/signup-form.tsx | 3 +- components/modals/auth-modal/index.ts | 2 +- components/modals/crop-editor-modal.tsx | 10 +- components/modals/edit-filters-modal.tsx | 2 +- .../components/ui/edit-top-item.tsx | 9 +- .../edit-top-stats-modal.tsx | 1 - .../components/ui/edit-card.tsx | 8 +- components/modals/editlist-modal/index.ts | 2 +- components/modals/followlist-modal.tsx | 8 +- .../components/anime-search-list.tsx | 13 +- .../components/character-search-list.tsx | 10 +- .../components/person-search-list.tsx | 22 +- .../search-modal/components/search-toggle.tsx | 2 +- .../search-modal/components/ui/anime-card.tsx | 2 +- .../components/ui/person-card.tsx | 2 +- .../components/useAnimeSearchList.ts | 10 +- .../components/usePersonSearchList.ts | 3 - .../search-modal/components/useSearchModal.ts | 11 +- components/modals/search-modal/index.ts | 2 +- .../modals/search-modal/search-modal.tsx | 5 - .../components/customization-form.tsx | 7 +- .../components/email-form.tsx | 8 +- .../components/general-form.tsx | 10 - .../components/notifications-form.tsx | 227 ++++++++++++ .../components/password-form.tsx | 12 +- .../components/username-form.tsx | 5 - .../watchlist-form/watchlist-form.tsx | 13 - .../modals/user-settings-modal/index.ts | 2 +- .../user-settings-modal.tsx | 57 ++- .../components/not-found-notifications.tsx | 2 +- .../components/ui/notification-item.tsx | 4 +- .../notifications-menu/notifications-menu.tsx | 5 +- components/navbar/components/profile-menu.tsx | 18 +- components/navbar/nav-breadcrumbs.tsx | 10 +- components/navbar/nav-dropdown.tsx | 25 +- components/snackbar-item.tsx | 10 +- components/sub-header.tsx | 3 +- components/text-expand.tsx | 10 +- components/typography/p.tsx | 6 +- components/ui/alert-dialog.tsx | 219 ++++++------ components/ui/aspect-ratio.tsx | 8 +- components/ui/avatar.tsx | 3 +- components/ui/badge.tsx | 8 +- components/ui/button.tsx | 15 +- components/ui/checkbox.tsx | 3 +- components/ui/collapsible.tsx | 12 +- components/ui/command.tsx | 1 - components/ui/context-menu.tsx | 325 +++++++++--------- components/ui/dialog.tsx | 1 - components/ui/dropdown-menu.tsx | 3 +- components/ui/form.tsx | 3 +- components/ui/hover-card.tsx | 57 +-- components/ui/input-tags.tsx | 5 +- components/ui/input.tsx | 2 +- components/ui/label.tsx | 3 +- components/ui/navigation-menu.tsx | 1 - components/ui/not-found.tsx | 5 +- components/ui/pagination.tsx | 7 +- components/ui/popover.tsx | 55 +-- components/ui/progress.tsx | 7 +- components/ui/radial-progress.tsx | 2 +- components/ui/rating.tsx | 8 +- components/ui/scroll-area.tsx | 3 +- components/ui/separator.tsx | 51 +-- components/ui/sheet.tsx | 3 +- components/ui/slider.tsx | 7 +- components/ui/switch.tsx | 3 +- components/ui/table.tsx | 183 +++++----- components/ui/tabs.tsx | 3 +- components/ui/textarea.tsx | 36 +- components/ui/toggle-group.tsx | 101 +++--- components/ui/toggle.tsx | 1 - components/ui/tooltip.tsx | 56 +-- components/watchlist-button.tsx | 2 +- next.config.mjs | 3 - services/api/anime/getAnimeCatalog.tsx | 7 +- services/api/anime/getAnimeCharacters.tsx | 7 +- services/api/anime/getAnimeFranchise.tsx | 7 +- services/api/anime/getAnimeGenres.tsx | 7 +- services/api/anime/getAnimeInfo.tsx | 7 +- services/api/anime/getAnimeStaff.tsx | 7 +- services/api/auth/activation.ts | 2 +- services/api/auth/confirmPasswordReset.ts | 2 +- services/api/auth/getOAuth.ts | 2 +- services/api/auth/login.ts | 4 +- services/api/auth/passwordReset.ts | 2 +- services/api/auth/resendActivation.ts | 2 +- services/api/auth/signup.ts | 2 +- services/api/characters/getCharacterAnime.tsx | 7 +- services/api/characters/getCharacterInfo.tsx | 7 +- .../api/characters/getCharacterVoices.tsx | 7 +- services/api/characters/getCharacters.tsx | 5 + services/api/comments/addComment.ts | 2 +- services/api/comments/deleteComment.ts | 2 +- services/api/comments/editComment.ts | 2 +- services/api/comments/getComments.ts | 2 +- services/api/config.ts | 3 + services/api/edit/acceptEdit.ts | 2 +- services/api/edit/closeEdit.ts | 2 +- services/api/edit/getEdit.ts | 2 +- services/api/edit/todo/getTodoAnime.ts | 2 +- services/api/favourite/getFavourite.ts | 2 +- services/api/fetchRequest.ts | 10 +- services/api/follow/checkFollow.ts | 2 +- services/api/follow/getFollowStats.ts | 2 +- services/api/follow/getFollowers.ts | 2 +- services/api/follow/getFollowings.ts | 2 +- services/api/follow/unfollow.ts | 2 +- .../api/integrations/mal/getAnimeFromMAL.ts | 1 - services/api/people/getPeople.tsx | 5 + services/api/people/getPersonAnime.tsx | 5 + services/api/people/getPersonCharacters.tsx | 5 + services/api/people/getPersonInfo.tsx | 7 +- .../settings/changeIgnoredNotifications.ts | 20 ++ .../api/settings/changeUserDescription.ts | 2 +- services/api/settings/changeUserEmail.ts | 2 +- services/api/settings/changeUserPassword.ts | 2 +- services/api/settings/changeUserUsername.ts | 2 +- .../api/settings/getIgnoredNotifications.ts | 17 + services/api/settings/importWatch.tsx | 2 +- services/api/sitemap/getAnimeSitemap.ts | 7 +- services/api/upload/uploadImage.ts | 2 +- services/api/user/getLoggedUserInfo.ts | 2 +- services/api/user/getUserHistory.ts | 2 +- services/api/user/getUserInfo.ts | 2 +- services/api/watch/addWatch.ts | 2 +- services/api/watch/deleteWatch.ts | 2 +- services/api/watch/getRandomWatch.ts | 2 +- services/api/watch/getWatch.ts | 2 +- services/api/watch/getWatchList.ts | 1 - services/api/watch/getWatchStats.ts | 2 +- services/hooks/anime/useCharacters.ts | 1 - services/hooks/collections/useCollection.ts | 4 - services/hooks/collections/useCollections.ts | 1 - .../hooks/collections/useCreateCollection.ts | 14 +- .../hooks/collections/useDeleteCollection.ts | 10 - .../hooks/collections/useUpdateCollection.ts | 10 - services/hooks/edit/useEditList.ts | 3 +- services/hooks/favorite/useAddFavorite.ts | 1 - services/hooks/favorite/useDeleteFavorite.ts | 4 - services/hooks/favorite/useFavorite.ts | 12 +- services/hooks/favorite/useFavorites.ts | 4 - services/hooks/follow/useFollow.ts | 4 - services/hooks/follow/useFollowChecker.ts | 8 +- services/hooks/follow/useUnfollow.ts | 4 - .../hooks/notifications/useNotifications.ts | 4 - .../notifications/useNotificationsCount.ts | 4 - .../notifications/useSeenNotification.ts | 14 +- .../settings/useChangeIgnoredNotifications.ts | 25 ++ .../hooks/settings/useIgnoredNotifications.ts | 19 + services/hooks/stats/useAnimeSchedule.ts | 3 +- services/hooks/useInfiniteList.tsx | 13 +- services/hooks/useScrollTrigger.ts | 1 + services/hooks/user/useLoggedUser.ts | 4 - services/hooks/user/useUserCollections.ts | 4 +- services/hooks/watch/useAddToList.tsx | 11 +- services/hooks/watch/useAddWatch.ts | 4 - services/hooks/watch/useDeleteFromList.tsx | 6 +- services/hooks/watch/useWatch.ts | 4 - services/providers/comments-provider.tsx | 2 +- services/providers/modal-provider.tsx | 23 +- services/providers/theme-provider.tsx | 17 +- types/api.d.ts | 2 +- types/hikka.d.ts | 14 +- utils/RQ-hydrate.tsx | 5 +- utils/constants.ts | 13 +- .../convertFavoriteActivity.tsx | 14 +- .../convertActivity/convertImportActivity.tsx | 3 +- utils/convertActivity/index.ts | 9 +- utils/convertNotification.tsx | 27 +- utils/convertRomaji.ts | 4 +- utils/createQueryString.ts | 2 +- utils/getDeclensionWord.ts | 13 +- utils/parseTextFromMarkDown.ts | 4 +- utils/truncateText.ts | 6 +- utils/utils.ts | 6 +- 319 files changed, 1750 insertions(+), 1437 deletions(-) create mode 100644 components/modal-manager.tsx create mode 100644 components/modals/user-settings-modal/components/notifications-form.tsx create mode 100644 services/api/settings/changeIgnoredNotifications.ts create mode 100644 services/api/settings/getIgnoredNotifications.ts create mode 100644 services/hooks/settings/useChangeIgnoredNotifications.ts create mode 100644 services/hooks/settings/useIgnoredNotifications.ts diff --git a/app/(api)/auth/activate/[token]/route.ts b/app/(api)/auth/activate/[token]/route.ts index c696169c..a592beb2 100644 --- a/app/(api)/auth/activate/[token]/route.ts +++ b/app/(api)/auth/activate/[token]/route.ts @@ -19,7 +19,8 @@ export async function GET( } return redirect( - '/anime?page=1&iPage=1&activation=error&error=' + (e as API.Error).code, + '/anime?page=1&iPage=1&activation=error&error=' + + (e as API.Error).code, ); } diff --git a/app/(api)/auth/google/route.ts b/app/(api)/auth/google/route.ts index 7c9c86c7..2dc4bd2f 100644 --- a/app/(api)/auth/google/route.ts +++ b/app/(api)/auth/google/route.ts @@ -25,7 +25,9 @@ export async function GET(request: Request) { ); } - return redirect('/anime?page=1&iPage=1&auth=error&provider=google&error=' + e); + return redirect( + '/anime?page=1&iPage=1&auth=error&provider=google&error=' + e, + ); } return redirect('/anime?page=1&iPage=1&auth=success&provider=google'); diff --git a/app/(api)/auth/reset/[token]/route.ts b/app/(api)/auth/reset/[token]/route.ts index 2f13f675..781c4115 100644 --- a/app/(api)/auth/reset/[token]/route.ts +++ b/app/(api)/auth/reset/[token]/route.ts @@ -4,5 +4,7 @@ export async function GET( request: Request, { params: { token } }: { params: { token: string } }, ) { - return redirect('/anime?page=1&iPage=1&modal=passwordConfirm&token=' + token); + return redirect( + '/anime?page=1&iPage=1&modal=passwordConfirm&token=' + token, + ); } diff --git a/app/(pages)/anime/(animeList)/components/anime-list/anime-list.tsx b/app/(pages)/anime/(animeList)/components/anime-list/anime-list.tsx index 447927e5..b77015b5 100644 --- a/app/(pages)/anime/(animeList)/components/anime-list/anime-list.tsx +++ b/app/(pages)/anime/(animeList)/components/anime-list/anime-list.tsx @@ -4,6 +4,7 @@ import * as React from 'react'; import { ReadonlyURLSearchParams } from 'next/navigation'; +import AnimeListSkeleton from '@/app/(pages)/anime/(animeList)/components/anime-list/components/anime-list-skeleton'; import EntryCard from '@/components/entry-card/entry-card'; import FiltersNotFound from '@/components/filters/components/filters-not-found'; import { Button } from '@/components/ui/button'; @@ -13,7 +14,6 @@ import useAuth from '@/services/hooks/auth/useAuth'; import { useSettingsContext } from '@/services/providers/settings-provider'; import { MEDIA_TYPE } from '@/utils/constants'; -import AnimeListSkeleton from '@/app/(pages)/anime/(animeList)/components/anime-list/components/anime-list-skeleton'; import { useNextPage, useUpdatePage } from './anime-list.hooks'; interface Props { diff --git a/app/(pages)/anime/(animeList)/components/anime-list/components/anime-list-skeleton.tsx b/app/(pages)/anime/(animeList)/components/anime-list/components/anime-list-skeleton.tsx index 5129dd5c..d3338541 100644 --- a/app/(pages)/anime/(animeList)/components/anime-list/components/anime-list-skeleton.tsx +++ b/app/(pages)/anime/(animeList)/components/anime-list/components/anime-list-skeleton.tsx @@ -4,7 +4,6 @@ import { range } from '@antfu/utils'; import SkeletonCard from '@/components/skeletons/entry-card'; - const AnimeListSkeleton = () => { return (
diff --git a/app/(pages)/anime/(animeList)/components/anime-list/index.ts b/app/(pages)/anime/(animeList)/components/anime-list/index.ts index a9c2dcab..49bf3c6a 100644 --- a/app/(pages)/anime/(animeList)/components/anime-list/index.ts +++ b/app/(pages)/anime/(animeList)/components/anime-list/index.ts @@ -1,3 +1,3 @@ import AnimeList from './anime-list'; -export default AnimeList; \ No newline at end of file +export default AnimeList; diff --git a/app/(pages)/anime/(animeList)/components/navbar/_components/search.tsx b/app/(pages)/anime/(animeList)/components/navbar/_components/search.tsx index 0ebb37bd..0fdcb044 100644 --- a/app/(pages)/anime/(animeList)/components/navbar/_components/search.tsx +++ b/app/(pages)/anime/(animeList)/components/navbar/_components/search.tsx @@ -7,7 +7,6 @@ import { usePathname, useRouter, useSearchParams } from 'next/navigation'; import { Input } from '@/components/ui/input'; import createQueryString from '@/utils/createQueryString'; - const Search = () => { const router = useRouter(); const pathname = usePathname(); @@ -38,4 +37,4 @@ const Search = () => { ); }; -export default Search; \ No newline at end of file +export default Search; diff --git a/app/(pages)/anime/(animeList)/components/navbar/index.ts b/app/(pages)/anime/(animeList)/components/navbar/index.ts index b4bbf3dc..052ab5d2 100644 --- a/app/(pages)/anime/(animeList)/components/navbar/index.ts +++ b/app/(pages)/anime/(animeList)/components/navbar/index.ts @@ -1,3 +1,3 @@ import Navbar from './navbar'; -export default Navbar; \ No newline at end of file +export default Navbar; diff --git a/app/(pages)/anime/(animeList)/components/navbar/navbar.tsx b/app/(pages)/anime/(animeList)/components/navbar/navbar.tsx index a20ab114..81762251 100644 --- a/app/(pages)/anime/(animeList)/components/navbar/navbar.tsx +++ b/app/(pages)/anime/(animeList)/components/navbar/navbar.tsx @@ -5,7 +5,6 @@ import { cn } from '@/utils/utils'; import Search from './_components/search'; - const Navbar = () => { return (
({ name: anime.title_ua || anime.title_en || anime.title_ja, alternateName: anime.synonyms, image: anime.poster, - description: parseTextFromMarkDown(anime.synopsis_ua || anime.synopsis_en), + description: parseTextFromMarkDown( + anime.synopsis_ua || anime.synopsis_en, + ), startDate: anime.start_date, endDate: anime.end_date, genre: anime.genres.map((genre) => genre.name_ua), @@ -51,4 +53,4 @@ const jsonSchema = ({ anime }: { anime: API.AnimeInfo }) => ({ }, }); -export default jsonSchema; \ No newline at end of file +export default jsonSchema; diff --git a/app/(pages)/anime/[slug]/components/about.tsx b/app/(pages)/anime/[slug]/components/about.tsx index 51c1b845..6bf2f112 100644 --- a/app/(pages)/anime/[slug]/components/about.tsx +++ b/app/(pages)/anime/[slug]/components/about.tsx @@ -18,7 +18,6 @@ import { import useAnimeInfo from '@/services/hooks/anime/useAnimeInfo'; import { AGE_RATING, MEDIA_TYPE, RELEASE_STATUS } from '@/utils/constants'; - const About = () => { const params = useParams(); @@ -70,8 +69,7 @@ const About = () => {
{data.media_type !== 'movie' && - (data.episodes_total || - data.episodes_released) ? ( + (data.episodes_total || data.episodes_released) ? (
diff --git a/app/(pages)/anime/[slug]/components/actions/actions.tsx b/app/(pages)/anime/[slug]/components/actions/actions.tsx index 05ac6d1d..d0ef3ce5 100644 --- a/app/(pages)/anime/[slug]/components/actions/actions.tsx +++ b/app/(pages)/anime/[slug]/components/actions/actions.tsx @@ -1,7 +1,6 @@ -import { getCookie } from '@/utils/actions'; -import WatchListButton from '@/components/watchlist-button'; - import WatchStats from '@/app/(pages)/anime/[slug]/components/actions/components/watch-stats'; +import WatchListButton from '@/components/watchlist-button'; +import { getCookie } from '@/utils/actions'; interface Props { anime?: API.AnimeInfo; diff --git a/app/(pages)/anime/[slug]/components/actions/index.ts b/app/(pages)/anime/[slug]/components/actions/index.ts index c8e7c724..ed1a44a8 100644 --- a/app/(pages)/anime/[slug]/components/actions/index.ts +++ b/app/(pages)/anime/[slug]/components/actions/index.ts @@ -1,3 +1,3 @@ import Actions from './actions'; -export default Actions; \ No newline at end of file +export default Actions; diff --git a/app/(pages)/anime/[slug]/components/characters.tsx b/app/(pages)/anime/[slug]/components/characters.tsx index b6ae4835..c2ac2d06 100644 --- a/app/(pages)/anime/[slug]/components/characters.tsx +++ b/app/(pages)/anime/[slug]/components/characters.tsx @@ -4,8 +4,8 @@ import clsx from 'clsx'; import { useParams } from 'next/navigation'; -import SubHeader from '@/components/sub-header'; import EntryCard from '@/components/entry-card/entry-card'; +import SubHeader from '@/components/sub-header'; import { Button } from '@/components/ui/button'; import useCharacters from '@/services/hooks/anime/useCharacters'; @@ -36,7 +36,8 @@ const Characters = ({ extended }: Props) => { className={clsx( 'grid grid-cols-3 gap-4 md:grid-cols-5 lg:gap-8', extended && 'md:grid-cols-6', - !extended && 'grid-flow-col grid-cols-scroll auto-cols-scroll overflow-x-auto no-scrollbar -mx-4 px-4' + !extended && + 'grid-flow-col grid-cols-scroll auto-cols-scroll overflow-x-auto no-scrollbar -mx-4 px-4', )} > {(extended ? main : main.slice(0, 5)).map((ch) => ( @@ -84,7 +85,6 @@ const Characters = ({ extended }: Props) => { ))}
- )} {extended && hasNextPage && ( } + {auth && ( + + )} diff --git a/app/(pages)/collections/[reference]/components/collection-groups.tsx b/app/(pages)/collections/[reference]/components/collection-groups.tsx index 8fd23f2e..b8663433 100644 --- a/app/(pages)/collections/[reference]/components/collection-groups.tsx +++ b/app/(pages)/collections/[reference]/components/collection-groups.tsx @@ -9,7 +9,6 @@ import { useCollectionContext } from '@/services/providers/collection-provider'; import CollectionGrid from './collection-grid'; - const CollectionGroups = () => { const params = useParams(); const { diff --git a/app/(pages)/collections/[reference]/components/collection-info.tsx b/app/(pages)/collections/[reference]/components/collection-info.tsx index d87f16cb..c8028a25 100644 --- a/app/(pages)/collections/[reference]/components/collection-info.tsx +++ b/app/(pages)/collections/[reference]/components/collection-info.tsx @@ -7,22 +7,26 @@ import BxDownvote from '~icons/bx/downvote'; import BxUpvote from '~icons/bx/upvote'; import MaterialSymbolsDeleteForeverRounded from '~icons/material-symbols/delete-forever-rounded'; - - import Link from 'next/link'; import { useParams } from 'next/navigation'; - - import { useQueryClient } from '@tanstack/react-query'; - - import FavoriteButton from '@/components/favorite-button'; import SubHeader from '@/components/sub-header'; import H5 from '@/components/typography/h5'; import P from '@/components/typography/p'; -import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from '@/components/ui/alert-dialog'; +import { + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogTitle, + AlertDialogTrigger, +} from '@/components/ui/alert-dialog'; import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'; import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; @@ -33,10 +37,8 @@ import useAuth from '@/services/hooks/auth/useAuth'; import useCollection from '@/services/hooks/collections/useCollection'; import useDeleteCollection from '@/services/hooks/collections/useDeleteCollection'; import useLoggedUser from '@/services/hooks/user/useLoggedUser'; - import { useCollectionContext } from '@/services/providers/collection-provider'; - const CollectionInfo = () => { const queryClient = useQueryClient(); const { auth } = useAuth(); diff --git a/app/(pages)/collections/[reference]/page.tsx b/app/(pages)/collections/[reference]/page.tsx index 11738f8b..761478a9 100644 --- a/app/(pages)/collections/[reference]/page.tsx +++ b/app/(pages)/collections/[reference]/page.tsx @@ -7,19 +7,17 @@ import { redirect } from 'next/navigation'; import { dehydrate } from '@tanstack/query-core'; import { HydrationBoundary } from '@tanstack/react-query'; -import { getCookie } from '@/utils/actions'; -import Breadcrumbs from '@/components/navbar/nav-breadcrumbs'; +import CollectionGroups from '@/app/(pages)/collections/[reference]/components/collection-groups'; +import CollectionInfo from '@/app/(pages)/collections/[reference]/components/collection-info'; +import CollectionTitle from '@/app/(pages)/collections/[reference]/components/collection-title'; import Comments from '@/components/comments/comments'; +import Breadcrumbs from '@/components/navbar/nav-breadcrumbs'; import getCollection from '@/services/api/collections/getCollection'; import CollectionProvider from '@/services/providers/collection-provider'; +import { getCookie } from '@/utils/actions'; import _generateMetadata from '@/utils/generateMetadata'; import getQueryClient from '@/utils/getQueryClient'; -import CollectionGroups from '@/app/(pages)/collections/[reference]/components/collection-groups'; -import CollectionInfo from '@/app/(pages)/collections/[reference]/components/collection-info'; -import CollectionTitle from '@/app/(pages)/collections/[reference]/components/collection-title'; - - export async function generateMetadata({ params: { reference }, }: { diff --git a/app/(pages)/collections/[reference]/update/page.tsx b/app/(pages)/collections/[reference]/update/page.tsx index 19eab90e..cce01427 100644 --- a/app/(pages)/collections/[reference]/update/page.tsx +++ b/app/(pages)/collections/[reference]/update/page.tsx @@ -1,11 +1,9 @@ import React from 'react'; -import CollectionProvider from '@/services/providers/collection-provider'; - import CollectionGroups from '@/app/(pages)/collections/new/components/collection-groups'; import CollectionSettings from '@/app/(pages)/collections/new/components/collection-settings'; import CollectionTitle from '@/app/(pages)/collections/new/components/collection-title'; - +import CollectionProvider from '@/services/providers/collection-provider'; const CollectionUpdatePage = () => { return ( @@ -15,12 +13,11 @@ const CollectionUpdatePage = () => {
- +
-
+
diff --git a/app/(pages)/collections/new/components/collection-grid/collection-grid.tsx b/app/(pages)/collections/new/components/collection-grid/collection-grid.tsx index 3f1839ef..73183ab0 100644 --- a/app/(pages)/collections/new/components/collection-grid/collection-grid.tsx +++ b/app/(pages)/collections/new/components/collection-grid/collection-grid.tsx @@ -154,9 +154,7 @@ const CollectionGrid = ({ group }: Props) => { - handleAddItem(value) - } + onClick={(value) => handleAddItem(value)} type="button" > { transition, }; - const poster = "poster" in content ? content.poster : content.image; - const title = "title_ua" in content ? content.title_ua || content.title_en || content.title_ja : content.name_ua || content.name_en; + const poster = 'poster' in content ? content.poster : content.image; + const title = + 'title_ua' in content + ? content.title_ua || content.title_en || content.title_ja + : content.name_ua || content.name_en; return (
{useMemo( () => ( - +
+
+ + + ); +}; + +export default Component; diff --git a/components/modals/user-settings-modal/components/password-form.tsx b/components/modals/user-settings-modal/components/password-form.tsx index cdb41ceb..bf87a979 100644 --- a/components/modals/user-settings-modal/components/password-form.tsx +++ b/components/modals/user-settings-modal/components/password-form.tsx @@ -3,22 +3,15 @@ import { useSnackbar } from 'notistack'; import { useForm } from 'react-hook-form'; - - import { useQueryClient } from '@tanstack/react-query'; - - -import H3 from '@/components/typography/h3'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import changeUserPassword from '@/services/api/settings/changeUserPassword'; import useAuth from '@/services/hooks/auth/useAuth'; - import { useModalContext } from '@/services/providers/modal-provider'; - type FormValues = { password: string; passwordConfirmation: string; @@ -62,9 +55,6 @@ const Component = () => { onSubmit={handleSubmit(onSubmit)} className="flex flex-col gap-6 p-6" > -
-

Пароль

-
@@ -102,4 +92,4 @@ const Component = () => { ); }; -export default Component; \ No newline at end of file +export default Component; diff --git a/components/modals/user-settings-modal/components/username-form.tsx b/components/modals/user-settings-modal/components/username-form.tsx index 34785f57..46543bf0 100644 --- a/components/modals/user-settings-modal/components/username-form.tsx +++ b/components/modals/user-settings-modal/components/username-form.tsx @@ -7,7 +7,6 @@ import { useRouter } from 'next/navigation'; import { useQueryClient } from '@tanstack/react-query'; -import H3 from '@/components/typography/h3'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; @@ -15,7 +14,6 @@ import changeUserUsername from '@/services/api/settings/changeUserUsername'; import useAuth from '@/services/hooks/auth/useAuth'; import { useModalContext } from '@/services/providers/modal-provider'; - type FormValues = { username: string; }; @@ -56,9 +54,6 @@ const Component = () => { onSubmit={handleSubmit(onSubmit)} className="flex flex-col gap-6 p-6" > -
-

Ім’я користувача

-
diff --git a/components/modals/user-settings-modal/components/watchlist-form/watchlist-form.tsx b/components/modals/user-settings-modal/components/watchlist-form/watchlist-form.tsx index a2129bd5..85067cff 100644 --- a/components/modals/user-settings-modal/components/watchlist-form/watchlist-form.tsx +++ b/components/modals/user-settings-modal/components/watchlist-form/watchlist-form.tsx @@ -3,28 +3,19 @@ import { useSnackbar } from 'notistack'; import { useEffect, useState } from 'react'; - - import { useQueryClient } from '@tanstack/react-query'; - - -import H3 from '@/components/typography/h3'; import { Button } from '@/components/ui/button'; import { Label } from '@/components/ui/label'; import { Switch } from '@/components/ui/switch'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; import importWatch from '@/services/api/settings/importWatch'; import useAuth from '@/services/hooks/auth/useAuth'; - import { useModalContext } from '@/services/providers/modal-provider'; - - import Anilist from './components/anilist'; import General from './components/general'; - const Component = () => { const { enqueueSnackbar } = useSnackbar(); const [tab, setTab] = useState<'general' | 'aniList'>('general'); @@ -69,10 +60,6 @@ const Component = () => { return (
-
-

Імпорт

-
- , }, + { + title: 'Сповіщення', + description: 'Змінити налаштування сповіщень', + slug: 'notifications', + form: , + }, { title: 'Кастомізація', description: 'Зміна налаштувань перегляду контенту на сайті', @@ -70,6 +77,24 @@ const DATA: { }, ]; +const Header = ({ title, onBack }: { title: string; onBack?: () => void }) => { + return ( +
+ {onBack && ( + + )} +

{title}

+
+ ); +}; + const Tabs = ({ setActiveTab, activeTab, @@ -78,10 +103,8 @@ const Tabs = ({ setActiveTab: Dispatch>; }) => { return ( -
-
-

Налаштування

-
+
+
    {DATA.map((tab) => (
  • @@ -121,7 +144,17 @@ const Component = () => { {!isMobile && ( )} - {activeForm?.form} +
    + {activeForm && ( +
    setActiveTab(undefined)} + title={activeForm?.title} + /> + )} +
    + {activeForm?.form} +
    +
); }; diff --git a/components/navbar/components/notifications-menu/components/not-found-notifications.tsx b/components/navbar/components/notifications-menu/components/not-found-notifications.tsx index 1ca9fa16..7b9104d6 100644 --- a/components/navbar/components/notifications-menu/components/not-found-notifications.tsx +++ b/components/navbar/components/notifications-menu/components/not-found-notifications.tsx @@ -3,8 +3,8 @@ import React from 'react'; import MaterialSymbolsNotificationImportantRounded from '~icons/material-symbols/notification-important-rounded'; -import { Label } from '@/components/ui/label'; import P from '@/components/typography/p'; +import { Label } from '@/components/ui/label'; interface Props {} diff --git a/components/navbar/components/notifications-menu/components/ui/notification-item.tsx b/components/navbar/components/notifications-menu/components/ui/notification-item.tsx index 9f12f017..5ae19e09 100644 --- a/components/navbar/components/notifications-menu/components/ui/notification-item.tsx +++ b/components/navbar/components/notifications-menu/components/ui/notification-item.tsx @@ -34,7 +34,9 @@ const Component = ({ data }: Props) => {
- + {!data.seen && (
)} diff --git a/components/navbar/components/notifications-menu/notifications-menu.tsx b/components/navbar/components/notifications-menu/notifications-menu.tsx index d2ea6887..f26ff33f 100644 --- a/components/navbar/components/notifications-menu/notifications-menu.tsx +++ b/components/navbar/components/notifications-menu/notifications-menu.tsx @@ -3,6 +3,8 @@ import React from 'react'; import MaterialSymbolsNotificationsRounded from '~icons/material-symbols/notifications-rounded'; +import NotFoundNotifications from '@/components/navbar/components/notifications-menu/components/not-found-notifications'; +import NotificationItem from '@/components/navbar/components/notifications-menu/components/ui/notification-item'; import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; import { @@ -17,9 +19,6 @@ import useNotificationsCount from '@/services/hooks/notifications/useNotificatio import useSeenNotification from '@/services/hooks/notifications/useSeenNotification'; import { convertNotification } from '@/utils/convertNotification'; -import NotFoundNotifications from '@/components/navbar/components/notifications-menu/components/not-found-notifications'; -import NotificationItem from '@/components/navbar/components/notifications-menu/components/ui/notification-item'; - interface Props {} const Component = ({}: Props) => { diff --git a/components/navbar/components/profile-menu.tsx b/components/navbar/components/profile-menu.tsx index 33067c57..e992bbe2 100644 --- a/components/navbar/components/profile-menu.tsx +++ b/components/navbar/components/profile-menu.tsx @@ -7,22 +7,24 @@ import MaterialSymbolsLogoutRounded from '~icons/material-symbols/logout-rounded import MaterialSymbolsPerson from '~icons/material-symbols/person'; import MaterialSymbolsSettingsOutline from '~icons/material-symbols/settings-outline'; - - import Link from 'next/link'; - - import SettingsModal from '@/components/modals/user-settings-modal/user-settings-modal'; import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'; import { Button } from '@/components/ui/button'; -import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from '@/components/ui/dropdown-menu'; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuGroup, + DropdownMenuItem, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from '@/components/ui/dropdown-menu'; import { Label } from '@/components/ui/label'; import useAuth from '@/services/hooks/auth/useAuth'; import useLoggedUser from '@/services/hooks/user/useLoggedUser'; import { useModalContext } from '@/services/providers/modal-provider'; - interface Props {} const Component = ({}: Props) => { @@ -37,9 +39,7 @@ const Component = ({}: Props) => { return ( - + @@ -84,4 +85,4 @@ const Component = ({ page, pages, setPage }: Props) => { ); }; -export default Component; \ No newline at end of file +export default Component; diff --git a/components/ui/popover.tsx b/components/ui/popover.tsx index f592fe18..955e3cda 100644 --- a/components/ui/popover.tsx +++ b/components/ui/popover.tsx @@ -1,35 +1,42 @@ -"use client" +'use client'; -import * as React from "react" -import * as PopoverPrimitive from "@radix-ui/react-popover" +import * as React from 'react'; -import { cn } from "@/utils/utils" +import * as PopoverPrimitive from '@radix-ui/react-popover'; -const Popover = PopoverPrimitive.Root +import { cn } from '@/utils/utils'; -const PopoverAnchor = PopoverPrimitive.Anchor +const Popover = PopoverPrimitive.Root; -const PopoverTrigger = PopoverPrimitive.Trigger +const PopoverAnchor = PopoverPrimitive.Anchor; -const PopoverPortal = PopoverPrimitive.Portal +const PopoverTrigger = PopoverPrimitive.Trigger; -const PopoverArrow = PopoverPrimitive.Arrow +const PopoverPortal = PopoverPrimitive.Portal; + +const PopoverArrow = PopoverPrimitive.Arrow; const PopoverContent = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, align = "center", sideOffset = 4, ...props }, ref) => ( + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => ( -)) -PopoverContent.displayName = PopoverPrimitive.Content.displayName - -export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverPortal } +)); +PopoverContent.displayName = PopoverPrimitive.Content.displayName; + +export { + Popover, + PopoverTrigger, + PopoverContent, + PopoverAnchor, + PopoverPortal, +}; diff --git a/components/ui/progress.tsx b/components/ui/progress.tsx index f7e25a6f..729d8478 100644 --- a/components/ui/progress.tsx +++ b/components/ui/progress.tsx @@ -6,7 +6,6 @@ import * as ProgressPrimitive from '@radix-ui/react-progress'; import { cn } from '@/utils/utils'; - const Progress = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef @@ -21,10 +20,12 @@ const Progress = React.forwardRef< > )); Progress.displayName = ProgressPrimitive.Root.displayName; -export { Progress }; \ No newline at end of file +export { Progress }; diff --git a/components/ui/radial-progress.tsx b/components/ui/radial-progress.tsx index 378f25a6..d5016df5 100644 --- a/components/ui/radial-progress.tsx +++ b/components/ui/radial-progress.tsx @@ -22,7 +22,7 @@ const Component = ({ role = 'progressbar', }: Props) => { return ( -
+
- {showEmptyIcon ? : } + {showEmptyIcon ? ( + + ) : ( + + )}
); @@ -121,4 +125,4 @@ const Rating = ({ ); }; -export default Rating; \ No newline at end of file +export default Rating; diff --git a/components/ui/scroll-area.tsx b/components/ui/scroll-area.tsx index 94391de6..124f2d6f 100644 --- a/components/ui/scroll-area.tsx +++ b/components/ui/scroll-area.tsx @@ -6,7 +6,6 @@ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area'; import { cn } from '@/utils/utils'; - const ScrollArea = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef @@ -49,4 +48,4 @@ const ScrollBar = React.forwardRef< )); ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName; -export { ScrollArea, ScrollBar }; \ No newline at end of file +export { ScrollArea, ScrollBar }; diff --git a/components/ui/separator.tsx b/components/ui/separator.tsx index 5b13b0df..b2235b6a 100644 --- a/components/ui/separator.tsx +++ b/components/ui/separator.tsx @@ -1,31 +1,32 @@ -"use client" +'use client'; -import * as React from "react" -import * as SeparatorPrimitive from "@radix-ui/react-separator" +import * as React from 'react'; -import { cn } from "@/utils/utils" +import * as SeparatorPrimitive from '@radix-ui/react-separator'; + +import { cn } from '@/utils/utils'; const Separator = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef + React.ElementRef, + React.ComponentPropsWithoutRef >( - ( - { className, orientation = "horizontal", decorative = true, ...props }, - ref - ) => ( - - ) -) -Separator.displayName = SeparatorPrimitive.Root.displayName + ( + { className, orientation = 'horizontal', decorative = true, ...props }, + ref, + ) => ( + + ), +); +Separator.displayName = SeparatorPrimitive.Root.displayName; -export { Separator } +export { Separator }; diff --git a/components/ui/sheet.tsx b/components/ui/sheet.tsx index 8f28c0c8..cd62d451 100644 --- a/components/ui/sheet.tsx +++ b/components/ui/sheet.tsx @@ -8,7 +8,6 @@ import * as SheetPrimitive from '@radix-ui/react-dialog'; import { cn } from '@/utils/utils'; - const Sheet = SheetPrimitive.Root; const SheetTrigger = SheetPrimitive.Trigger; @@ -137,4 +136,4 @@ export { SheetFooter, SheetTitle, SheetDescription, -}; \ No newline at end of file +}; diff --git a/components/ui/slider.tsx b/components/ui/slider.tsx index d3255c64..536cd697 100644 --- a/components/ui/slider.tsx +++ b/components/ui/slider.tsx @@ -6,7 +6,6 @@ import * as SliderPrimitive from '@radix-ui/react-slider'; import { cn } from '@/utils/utils'; - const Slider = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef @@ -24,9 +23,11 @@ const Slider = React.forwardRef< - {value && value.length === 2 && } + {value && value.length === 2 && ( + + )} )); Slider.displayName = SliderPrimitive.Root.displayName; -export { Slider }; \ No newline at end of file +export { Slider }; diff --git a/components/ui/switch.tsx b/components/ui/switch.tsx index f82b58c7..9edbc953 100644 --- a/components/ui/switch.tsx +++ b/components/ui/switch.tsx @@ -6,7 +6,6 @@ import * as SwitchPrimitives from '@radix-ui/react-switch'; import { cn } from '@/utils/utils'; - const Switch = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef @@ -28,4 +27,4 @@ const Switch = React.forwardRef< )); Switch.displayName = SwitchPrimitives.Root.displayName; -export { Switch }; \ No newline at end of file +export { Switch }; diff --git a/components/ui/table.tsx b/components/ui/table.tsx index 294544f3..9f9e0c13 100644 --- a/components/ui/table.tsx +++ b/components/ui/table.tsx @@ -1,117 +1,120 @@ -import * as React from "react" +import * as React from 'react'; -import { cn } from "@/utils/utils" +import { cn } from '@/utils/utils'; const Table = React.forwardRef< - HTMLTableElement, - React.HTMLAttributes + HTMLTableElement, + React.HTMLAttributes >(({ className, ...props }, ref) => ( -
- - -)) -Table.displayName = "Table" +
+
+ +)); +Table.displayName = 'Table'; const TableHeader = React.forwardRef< - HTMLTableSectionElement, - React.HTMLAttributes + HTMLTableSectionElement, + React.HTMLAttributes >(({ className, ...props }, ref) => ( - -)) -TableHeader.displayName = "TableHeader" + +)); +TableHeader.displayName = 'TableHeader'; const TableBody = React.forwardRef< - HTMLTableSectionElement, - React.HTMLAttributes + HTMLTableSectionElement, + React.HTMLAttributes >(({ className, ...props }, ref) => ( - -)) -TableBody.displayName = "TableBody" + +)); +TableBody.displayName = 'TableBody'; const TableFooter = React.forwardRef< - HTMLTableSectionElement, - React.HTMLAttributes + HTMLTableSectionElement, + React.HTMLAttributes >(({ className, ...props }, ref) => ( - tr]:last:border-b-0", - className - )} - {...props} - /> -)) -TableFooter.displayName = "TableFooter" + tr]:last:border-b-0', + className, + )} + {...props} + /> +)); +TableFooter.displayName = 'TableFooter'; const TableRow = React.forwardRef< - HTMLTableRowElement, - React.HTMLAttributes + HTMLTableRowElement, + React.HTMLAttributes >(({ className, ...props }, ref) => ( - -)) -TableRow.displayName = "TableRow" + +)); +TableRow.displayName = 'TableRow'; const TableHead = React.forwardRef< - HTMLTableCellElement, - React.ThHTMLAttributes + HTMLTableCellElement, + React.ThHTMLAttributes >(({ className, ...props }, ref) => ( -
-)) -TableHead.displayName = "TableHead" + +)); +TableHead.displayName = 'TableHead'; const TableCell = React.forwardRef< - HTMLTableCellElement, - React.TdHTMLAttributes + HTMLTableCellElement, + React.TdHTMLAttributes >(({ className, ...props }, ref) => ( - -)) -TableCell.displayName = "TableCell" + +)); +TableCell.displayName = 'TableCell'; const TableCaption = React.forwardRef< - HTMLTableCaptionElement, - React.HTMLAttributes + HTMLTableCaptionElement, + React.HTMLAttributes >(({ className, ...props }, ref) => ( -
-)) -TableCaption.displayName = "TableCaption" + +)); +TableCaption.displayName = 'TableCaption'; export { - Table, - TableHeader, - TableBody, - TableFooter, - TableHead, - TableRow, - TableCell, - TableCaption, -} + Table, + TableHeader, + TableBody, + TableFooter, + TableHead, + TableRow, + TableCell, + TableCaption, +}; diff --git a/components/ui/tabs.tsx b/components/ui/tabs.tsx index 50b81dd8..44090165 100644 --- a/components/ui/tabs.tsx +++ b/components/ui/tabs.tsx @@ -6,7 +6,6 @@ import * as TabsPrimitive from '@radix-ui/react-tabs'; import { cn } from '@/utils/utils'; - const Tabs = TabsPrimitive.Root; const TabsList = React.forwardRef< @@ -54,4 +53,4 @@ const TabsContent = React.forwardRef< )); TabsContent.displayName = TabsPrimitive.Content.displayName; -export { Tabs, TabsList, TabsTrigger, TabsContent }; \ No newline at end of file +export { Tabs, TabsList, TabsTrigger, TabsContent }; diff --git a/components/ui/textarea.tsx b/components/ui/textarea.tsx index 2130851c..80ecc580 100644 --- a/components/ui/textarea.tsx +++ b/components/ui/textarea.tsx @@ -1,24 +1,24 @@ -import * as React from "react" +import * as React from 'react'; -import { cn } from "@/utils/utils" +import { cn } from '@/utils/utils'; export interface TextareaProps - extends React.TextareaHTMLAttributes {} + extends React.TextareaHTMLAttributes {} const Textarea = React.forwardRef( - ({ className, ...props }, ref) => { - return ( -