@ludo.ninja/components 2.0.10 → 2.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/api/graphql/index.js +3 -7
- package/build/api/server-assets/mutations/useDislikeAsset/index.js +7 -9
- package/build/api/server-assets/mutations/useLikeAsset/index.js +7 -9
- package/build/api/server-assets/queries/useFetchAssetByBlockchain/index.js +14 -21
- package/build/api/server-assets/queries/useFetchAssets/index.js +11 -14
- package/build/api/server-assets/queries/useFetchDynamicAssetLikes/index.js +13 -15
- package/build/api/server-assets/queries/useFetchDynamicAssetsLikes/index.js +11 -13
- package/build/api/server-collection/mutations/useDislikeCollection/index.js +7 -9
- package/build/api/server-collection/mutations/useLikeCollection/index.js +7 -9
- package/build/api/server-experiences/queries/useFetchMyExperienceWithLevel/index.js +19 -21
- package/build/api/server-experiences/queries/useFetchMyTasks/index.js +15 -20
- package/build/api/server-galleries/mutations/useAddAssetsToGallery/index.js +9 -12
- package/build/api/server-galleries/mutations/useAddChangeGalleryBanner/index.js +9 -13
- package/build/api/server-galleries/mutations/useAddCollectionsToGallery/index.js +9 -12
- package/build/api/server-galleries/mutations/useAddCreationsToGallery/index.js +13 -16
- package/build/api/server-galleries/mutations/useCreateFavorites/index.js +5 -8
- package/build/api/server-galleries/mutations/useCreateGallery/index.js +5 -8
- package/build/api/server-galleries/mutations/useDeleteGallery/index.js +10 -12
- package/build/api/server-galleries/mutations/useDeleteGalleryBanner/index.js +9 -13
- package/build/api/server-galleries/mutations/useEditGallery/index.js +5 -7
- package/build/api/server-galleries/mutations/useRemoveAssetFromGallery/index.js +13 -16
- package/build/api/server-galleries/mutations/useRemoveCollectionFromGallery/index.js +12 -15
- package/build/api/server-galleries/queries/useFetchGallery/index.js +11 -18
- package/build/api/server-galleries/queries/useFetchGalleryAssets/index.js +9 -12
- package/build/api/server-galleries/queries/useFetchMyFavorites/index.js +11 -17
- package/build/api/server-galleries/queries/useFetchMyGalleries/index.js +13 -19
- package/build/api/server-galleries/queries/useFetchSubscribedGalleries/index.js +9 -11
- package/build/api/server-galleries/queries/useFetchUserFavorites/index.js +10 -16
- package/build/api/server-identities/mutations/useAddWalletElrond/index.js +10 -12
- package/build/api/server-identities/mutations/useAddWalletFlow/index.js +10 -12
- package/build/api/server-identities/mutations/useAddWalletMetamask/index.js +10 -12
- package/build/api/server-identities/mutations/useAddWalletSolana/index.js +10 -12
- package/build/api/server-identities/mutations/useAddWalletTezos/index.js +10 -12
- package/build/api/server-identities/mutations/useFollowProfile/index.js +13 -15
- package/build/api/server-identities/mutations/useGenerateNewInviteCodes/index.js +7 -9
- package/build/api/server-identities/mutations/useInviteCode/index.js +9 -11
- package/build/api/server-identities/mutations/useRemoveWallet/index.js +10 -12
- package/build/api/server-identities/mutations/useRevokeToken/index.js +5 -7
- package/build/api/server-identities/mutations/useSaveEmailOfJoiner/index.js +9 -11
- package/build/api/server-identities/mutations/useUnfollowProfile/index.js +13 -15
- package/build/api/server-identities/queries/useFetchProfile/index.js +19 -23
- package/build/api/server-identities/queries/useFetchUserWallets/index.js +4 -6
- package/build/api/server-medias/mutations/useDeleteUserpic/index.js +7 -9
- package/build/api/server-medias/mutations/useUploadUserpic/index.js +7 -9
- package/build/api/server-medias/queries/useFetchUserPic/index.js +8 -10
- package/build/api/server-opportunities/mutations/useDislikeOpportunity.js +8 -12
- package/build/api/server-opportunities/mutations/useLikeOpportunity.js +8 -12
- package/build/api/server-opportunities/mutations/useOpenOpportunity/index.js +8 -10
- package/build/api/server-opportunities/queries/useGetOpportunities.js +9 -13
- package/build/api/server-preferences/queries/fetchSearchResultSelections/index.js +6 -11
- package/build/api/server-preferences/queries/fetchSearchResultSelections/queryData.js +9 -13
- package/build/api/server-search/queries/useFetchAllCreations/index.js +15 -23
- package/build/api/server-search/queries/useFetchAssetsCount/index.js +2 -4
- package/build/api/server-search/queries/useFetchCollection/index.js +16 -23
- package/build/api/server-search/queries/useFetchCollections/index.js +16 -23
- package/build/api/server-search/queries/useFetchDynamicCollectionData/index.js +18 -24
- package/build/api/server-search/queries/useFetchFindAllTopEntitiesByName/index.js +16 -24
- package/build/api/server-search/queries/useFetchNetWorth/index.js +7 -9
- package/build/api/server-search/queries/useFindCreations/index.js +20 -28
- package/build/api/server-search/queries/useFindProfilesByName/index.js +14 -19
- package/build/api/server-search/queries/useFindShowcaseItems/index.js +1 -3
- package/build/api/server-search/queries/useFindUserCreations/index.js +16 -21
- package/build/api/server-search/queries/useFindUserShowcaseItems/index.js +1 -3
- package/build/api/subscriptions/SubscriberInviteNotification.js +18 -22
- package/build/components/assetPage/assetLikes/index.js +25 -30
- package/build/components/assetPage/assetNft/index.js +14 -21
- package/build/components/assetPage/audioVideoPlayer/Duration.js +5 -8
- package/build/components/assetPage/audioVideoPlayer/index.js +51 -81
- package/build/components/assetPage/category/index.js +18 -25
- package/build/components/assetPage/description/index.js +17 -24
- package/build/components/assetPage/index.js +11 -25
- package/build/components/assetPage/information/index.js +43 -50
- package/build/components/assetPage/marketPlaces/index.js +26 -33
- package/build/components/assetPage/media/AssetImage/index.js +52 -80
- package/build/components/assetPage/moreDropDown/index.js +47 -77
- package/build/components/assetPage/participants/index.js +64 -71
- package/build/components/assetPage/priceRank/index.js +38 -45
- package/build/components/assetPage/properties/index.js +19 -26
- package/build/components/assetPage/slider/index.js +44 -51
- package/build/components/assetPage/slider/slideItem.js +14 -21
- package/build/components/assetPage/slider/store.js +2 -5
- package/build/components/assetPage/tittle/index.js +32 -39
- package/build/components/assetPage/viewer3D/index.js +50 -58
- package/build/components/base/Meta/index.js +6 -11
- package/build/components/base/NoSSR/index.js +4 -9
- package/build/components/favoriteList/add/addCreationToFavoriteList/index.js +14 -19
- package/build/components/gallery/add/addCreationToGallery/index.js +20 -25
- package/build/components/headers/components/headerExperienceLabel/index.js +12 -17
- package/build/components/headers/components/headerUserPic/index.js +11 -16
- package/build/components/headers/header/index.js +17 -22
- package/build/components/headers/headerSearch/index.js +21 -26
- package/build/components/headers/headerSimple/index.js +14 -19
- package/build/components/linkTabs/index.js +14 -19
- package/build/components/linkTabs/linkTab/index.js +22 -27
- package/build/components/profile/profileSkeleton/index.js +10 -18
- package/build/components/search/SearchInputContainer.js +61 -91
- package/build/components/search/searchCloseMoreButtons/index.js +20 -25
- package/build/components/search/searchSimpleInput/index.js +37 -65
- package/build/components/search/searchSuggestions/index.js +32 -37
- package/build/components/search/searchSuggestions/searchSuggestionsCaption/index.js +17 -22
- package/build/components/search/searchSuggestions/searchSuggestionsFooter/index.js +20 -25
- package/build/components/search/searchSuggestions/searchSuggestionsItem/index.js +29 -34
- package/build/components/search/searchSuggestions/searchSuggestionsItem/searchSuggestionsItemSkeleton/index.js +28 -58
- package/build/components/search/searchSuggestions/searchSuggestionsNotFound/index.js +19 -24
- package/build/components/searchFiltersConnector/filters/applyResetBtns/index.js +11 -16
- package/build/components/searchFiltersConnector/filters/galleriesFiltersForm/index.js +13 -18
- package/build/components/searchFiltersConnector/filters/index.js +38 -43
- package/build/components/searchFiltersConnector/filters/mobileFilters/index.js +5 -10
- package/build/components/searchFiltersConnector/filters/setsFiltersForm/index.js +12 -17
- package/build/components/searchFiltersConnector/index.js +12 -19
- package/build/components/sidebar/data.js +18 -26
- package/build/components/sidebar/index.js +59 -87
- package/build/components/sidebar/initializer.js +4 -34
- package/build/components/sidebar/sidebarFilters/index.js +8 -13
- package/build/components/sidebar/sidebarInviteCodeLabel/index.js +14 -19
- package/build/components/toTopBtn/index.js +32 -39
- package/build/dto/AssetEntity/index.js +19 -24
- package/build/dto/AssetEntity/interface.js +1 -2
- package/build/dto/AssetEntity/views/AssetAudio/index.js +11 -16
- package/build/dto/AssetEntity/views/AssetImage/index.js +12 -17
- package/build/dto/AssetEntity/views/AssetObject/index.js +13 -18
- package/build/dto/AssetEntity/views/AssetOther/index.js +13 -18
- package/build/dto/AssetEntity/views/AssetScreenshot/index.js +12 -17
- package/build/dto/AssetEntity/views/AssetVideo/index.js +11 -16
- package/build/dto/AssetEntity/views/index.js +6 -16
- package/build/dto/Collection/CollectionCreationEntity/index.js +22 -27
- package/build/dto/Collection/CollectionCreationEntity/interface.js +1 -2
- package/build/dto/Collection/CollectionEntity/index.js +5 -7
- package/build/dto/Collection/CollectionEntity/interface.js +1 -2
- package/build/dto/CreationEntity/index.js +19 -24
- package/build/dto/CreationEntity/interface.js +1 -2
- package/build/dto/GalleryEntityV2/index.js +5 -10
- package/build/dto/GalleryEntityV2/interface.js +1 -2
- package/build/dto/Theme/interface.js +1 -5
- package/build/dto/common/ItemType/data.js +26 -28
- package/build/dto/common/ItemType/index.js +5 -7
- package/build/dto/common/ItemViews/CreationAudio/index.js +11 -16
- package/build/dto/common/ItemViews/CreationImage/index.js +12 -17
- package/build/dto/common/ItemViews/CreationObject/index.js +10 -15
- package/build/dto/common/ItemViews/CreationOther/index.js +11 -16
- package/build/dto/common/ItemViews/CreationVideo/index.js +11 -16
- package/build/dto/common/Media/Audio/index.js +9 -14
- package/build/dto/common/Media/Image/index.js +10 -15
- package/build/dto/common/Media/Object/index.js +9 -14
- package/build/dto/common/Media/Other/index.js +14 -19
- package/build/dto/common/Media/Screenshot/index.js +10 -15
- package/build/dto/common/Media/Urls/index.js +23 -38
- package/build/dto/common/Media/Video/index.js +9 -14
- package/build/dto/common/Media/index.js +3 -5
- package/build/dto/common/Media/interface.js +1 -2
- package/build/entities/user/type.js +1 -2
- package/build/fonts/FontsInitializeLayout.js +13 -16
- package/build/fonts/vars.js +1 -6
- package/build/hooks/apollo/index.js +8 -11
- package/build/hooks/audio/useMultiAudio/index.js +10 -12
- package/build/hooks/extension/useExtension/index.js +8 -10
- package/build/hooks/favorites/useGetFavoriteGallaryCreations/index.js +33 -39
- package/build/hooks/favorites/useGetUserFevoritesCreations/index.js +32 -39
- package/build/hooks/galleries/useGetUserGalleriesCreations/index.js +32 -39
- package/build/hooks/likes/dynamic/useFindCollectionsAndLikes.js +27 -34
- package/build/hooks/likes/dynamic/useFindCreationsAndLikes.js +26 -32
- package/build/hooks/likes/dynamic/useGetCollectionInfoAndLikes.js +23 -29
- package/build/hooks/likes/dynamic/useGetCreationsAndLikes.js +27 -34
- package/build/hooks/likes/dynamic/useGetCreationsAndLikesByType.js +30 -36
- package/build/hooks/likes/dynamic/useGetMixedLikesFavoriteList.js +11 -13
- package/build/hooks/likes/dynamic/useGetTableLikes.js +24 -30
- package/build/hooks/likes/index.js +27 -32
- package/build/hooks/likes/useGetLikesAsset.js +20 -24
- package/build/layouts/GlobalLayout.js +24 -31
- package/build/layouts/base/LWithRegularHeader/index.js +7 -12
- package/build/layouts/base/LWithRegularHeader/type.js +1 -2
- package/build/layouts/base/LWithSearchHeader/index.js +5 -10
- package/build/layouts/base/LWithSearchHeader/type.js +1 -2
- package/build/layouts/custom/mainLayout/index.js +8 -13
- package/build/layouts/custom/styles.js +15 -21
- package/build/layouts/pageTransitionLayout.js +6 -8
- package/build/layouts/pageWithLayout.js +1 -2
- package/build/modules/gallery/api/useGetAssetsAndCollectionForFavorite.js +35 -42
- package/build/modules/gallery/api/useGetFavoriteGallery.js +11 -15
- package/build/modules/gallery/store.js +10 -16
- package/build/modules/gallery/ui/AllResults.js +7 -11
- package/build/modules/gallery/ui/Description.js +24 -31
- package/build/modules/gallery/ui/EditGallery.js +15 -22
- package/build/modules/gallery/ui/GalleryDeleteIcon.js +12 -19
- package/build/modules/gallery/ui/PlaceholderItemsGallery.js +21 -28
- package/build/modules/gallery/ui/STopSections.js +10 -16
- package/build/modules/gallery/ui/chooseGalleryItems/chooseGalleryItem/index.js +25 -30
- package/build/modules/gallery/ui/chooseGalleryItems/index.js +47 -52
- package/build/modules/gallery/ui/createGalleryForm/index.js +31 -36
- package/build/modules/gallery/ui/editGalleryForm/index.js +40 -45
- package/build/modules/gallery/ui/itemsPreview/index.js +54 -61
- package/build/modules/gallery/useToGalleryAsset.js +15 -23
- package/build/modules/notifications/CreatorNotifications.js +10 -40
- package/build/modules/notifications/index.js +3 -6
- package/build/modules/opportunity/OpportunityCard.js +81 -88
- package/build/modules/opportunity/OpportunityDropDown.js +11 -18
- package/build/modules/opportunity/ShareIcon.js +2 -6
- package/build/modules/opportunity/encodeQuery.js +4 -10
- package/build/modules/opportunity/popup/CopyIcon.js +3 -5
- package/build/modules/opportunity/popup/FacebookIcon.js +3 -5
- package/build/modules/opportunity/popup/LinkedInIcon.js +3 -5
- package/build/modules/opportunity/popup/LogoXIcon.js +3 -5
- package/build/modules/opportunity/popup/OpportunityMenu.js +44 -51
- package/build/modules/opportunity/type.js +1 -2
- package/build/modules/sessionScroll/globalTabs.js +1 -4
- package/build/modules/sessionScroll/index.js +16 -23
- package/build/modules/sessionScroll/type.js +1 -2
- package/build/modules/sessionScroll/useVirtuosoInitialScroll.js +12 -16
- package/build/modules/user/auth/useAuthVerification.js +10 -37
- package/build/modules/user/auth/useSignIn.js +7 -11
- package/build/modules/user/auth/useSignOut.js +11 -18
- package/build/modules/user/profileData/profileDataInitialization.js +14 -18
- package/build/modules/user/store.js +9 -12
- package/build/modules/virtuoso/VirtuosoPageBuilder.js +36 -43
- package/build/modules/virtuoso/VirtuosoToTopBtn.js +8 -13
- package/build/modules/virtuoso/types.js +1 -2
- package/build/modules/virtuoso/useSubscribeVirtuosoScrollToHeader.js +4 -8
- package/build/modules/virtuoso/useVirtuosoData.js +6 -10
- package/build/store/env/index.js +4 -7
- package/build/store/index.js +4 -7
- package/build/store/media/index.js +4 -7
- package/build/store/media/types.js +1 -2
- package/build/store/ui/index.js +21 -24
- package/build/store/ui/types.js +1 -2
- package/build/store/ui/utils.js +4 -8
- package/build/styles/ScreenWidth.js +3 -6
- package/build/styles/animations/index.js +3 -6
- package/build/styles/colors/index.js +1 -38
- package/build/styles/globalStyles.js +5 -7
- package/build/styles/mixins/boxShadow.js +3 -5
- package/build/styles/mixins/boxTransform.js +3 -5
- package/build/styles/mixins/z-indexes.js +10 -13
- package/build/styles/typography/index.js +1 -13
- package/build/system/ActiveLink/ActiveLink.test.js +14 -19
- package/build/system/ActiveLink/index.js +10 -38
- package/build/system/Alert/index.js +6 -11
- package/build/system/Alert/type.js +1 -8
- package/build/system/BasicOverlay/index.js +5 -10
- package/build/system/Buttons/IconButton/index.js +2 -7
- package/build/system/Buttons/IconWithButton/index.js +2 -7
- package/build/system/Buttons/MainButton/index.js +2 -7
- package/build/system/Buttons/SecondaryButton/index.js +2 -7
- package/build/system/Cards/CardCheckbox/CardCheckbox.test.js +8 -13
- package/build/system/Cards/CardCheckbox/index.js +19 -24
- package/build/system/Cards/CardContent/CardCategory/CardCategory.test.js +11 -16
- package/build/system/Cards/CardContent/CardCategory/index.js +13 -18
- package/build/system/Cards/CardContent/CardContent.test.js +31 -36
- package/build/system/Cards/CardContent/CardLikes/CardLikes.test.js +11 -16
- package/build/system/Cards/CardContent/CardLikes/index.js +11 -16
- package/build/system/Cards/CardContent/CardShowMore/CardShowMore.test.js +20 -25
- package/build/system/Cards/CardContent/CardShowMore/index.js +34 -40
- package/build/system/Cards/CardContent/index.js +32 -37
- package/build/system/Cards/CardMedia/CardAudio/CardAudio.test.js +35 -40
- package/build/system/Cards/CardMedia/CardAudio/index.js +18 -23
- package/build/system/Cards/CardMedia/CardImage/CardImage.test.js +14 -19
- package/build/system/Cards/CardMedia/CardImage/index.js +8 -13
- package/build/system/Cards/CardMedia/CardVideo/index.js +17 -22
- package/build/system/Cards/CardRank/index.js +32 -37
- package/build/system/Cards/CreationCard/CardHead.js +35 -42
- package/build/system/Cards/CreationCard/index.js +45 -76
- package/build/system/Cards/MultiMediaCard/index.js +30 -35
- package/build/system/Cards/Styles/Content.js +9 -14
- package/build/system/Cards/Styles/Head.js +8 -13
- package/build/system/Cards/Styles/Headicons.js +23 -28
- package/build/system/Cards/Styles/Image.js +8 -13
- package/build/system/Cards/Styles/Likes.js +14 -19
- package/build/system/Cards/Styles/MultiHead.js +11 -16
- package/build/system/Cards/Styles/Video.js +3 -8
- package/build/system/CardsHolderWithSkeleton/CardsHolder/CardsError/index.js +14 -19
- package/build/system/CardsHolderWithSkeleton/CardsHolder/CardsNoResults/index.js +10 -15
- package/build/system/CardsHolderWithSkeleton/CardsHolder/CardsSkeleton/index.js +17 -24
- package/build/system/CardsHolderWithSkeleton/CardsHolderLoader/index.js +15 -20
- package/build/system/DropDown/DropDown.test.js +14 -19
- package/build/system/DropDown/index.js +12 -17
- package/build/system/Filters/helpers.js +1 -5
- package/build/system/Filters/type.js +2 -5
- package/build/system/Forms/Checkbox/Checkbox.test.js +13 -18
- package/build/system/Forms/Checkbox/index.js +16 -21
- package/build/system/Forms/DatePicker/index.js +46 -51
- package/build/system/Forms/ErrorLabel/ErrorLabel.test.js +11 -16
- package/build/system/Forms/ErrorLabel/index.js +10 -15
- package/build/system/Forms/Input/Input.test.js +13 -18
- package/build/system/Forms/Input/index.js +29 -35
- package/build/system/Forms/Input/type.js +1 -2
- package/build/system/Forms/Messages/index.js +1 -3
- package/build/system/Forms/RadioInput/index.js +12 -17
- package/build/system/Forms/Selects/DesktopSelect/index.js +41 -69
- package/build/system/Forms/Selects/DesktopSelect/type.js +1 -2
- package/build/system/Forms/Selects/MobileSelect/index.js +10 -15
- package/build/system/Forms/TextArea/TextArea.test.js +13 -18
- package/build/system/Forms/TextArea/index.js +26 -31
- package/build/system/Forms/index.js +5 -14
- package/build/system/Img/ExternalImage/index.js +11 -17
- package/build/system/Img/ImageInterceptor/ImageInterceptor.test.js +18 -23
- package/build/system/Img/ImageInterceptor/index.js +10 -40
- package/build/system/Img/Profilepic/index.js +12 -19
- package/build/system/Img/Userpic/UserPic.test.js +15 -20
- package/build/system/Img/Userpic/index.js +28 -33
- package/build/system/Img/index.js +3 -19
- package/build/system/Labels/ExperienceLabel/ExperienceLabel.test.js +12 -17
- package/build/system/Labels/ExperienceLabel/index.js +27 -32
- package/build/system/Labels/InviteLabel/InviteLabel.test.js +10 -15
- package/build/system/Labels/InviteLabel/index.js +14 -19
- package/build/system/Labels/SkeletonLabel/index.js +2 -7
- package/build/system/Modals/Modal/Modal.test.js +11 -16
- package/build/system/Modals/Modal/index.js +24 -29
- package/build/system/Modals/ModalSidebar/CreatorModalSidebarPortal.js +7 -37
- package/build/system/Modals/ModalSidebar/ModalSidebar.test.js +11 -16
- package/build/system/Modals/ModalSidebar/ModalSidebarPortal.js +5 -9
- package/build/system/Modals/ModalSidebar/index.js +23 -29
- package/build/system/Overlay/Overlay.test.js +11 -16
- package/build/system/Overlay/index.js +11 -16
- package/build/system/PageLoader/index.js +2 -7
- package/build/system/Palete/index.js +2 -7
- package/build/system/ShareIconResize.js +14 -21
- package/build/system/Tabs/TabNavLink/TabNavLink.test.js +15 -20
- package/build/system/Tabs/TabNavLink/index.js +17 -23
- package/build/system/Tabs/TabsNav/TabsNav.test.js +18 -23
- package/build/system/Tabs/TabsNav/index.js +7 -13
- package/build/system/Tabs/TabsNav/type.js +1 -2
- package/build/system/Tabs/TabsPanel/TabsPanel.test.js +13 -18
- package/build/system/Tabs/TabsPanel/index.js +5 -10
- package/build/system/index.js +6 -22
- package/build/system/theme.js +1 -7
- package/build/utils/3d.js +1 -5
- package/build/utils/adaptive/check4k.js +5 -9
- package/build/utils/adaptive/scale.js +5 -9
- package/build/utils/auth/index.js +3 -7
- package/build/utils/copyBtn/index.js +23 -30
- package/build/utils/env/index.js +1 -5
- package/build/utils/extractItemIds.js +3 -9
- package/build/utils/getDimensionsImage.js +1 -5
- package/build/utils/getPageSizeAssets.js +4 -8
- package/build/utils/imageProportionsSize/index.js +1 -5
- package/build/utils/screen/index.js +24 -30
- package/build/utils/seacrhTabs.js +1 -4
- package/build/utils/ssrFunctions/index.js +9 -15
- package/build/utils/ui/index.js +1 -5
- package/package.json +1 -1
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.APOLLO_STATE_PROP_NAME = void 0;
|
|
4
|
-
exports.addApolloState = addApolloState;
|
|
5
|
-
exports.APOLLO_STATE_PROP_NAME = '__APOLLO_STATE__';
|
|
6
|
-
function addApolloState(client, pageProps) {
|
|
1
|
+
export const APOLLO_STATE_PROP_NAME = '__APOLLO_STATE__';
|
|
2
|
+
export function addApolloState(client, pageProps) {
|
|
7
3
|
if (pageProps?.props) {
|
|
8
|
-
pageProps.props[
|
|
4
|
+
pageProps.props[APOLLO_STATE_PROP_NAME] = client.cache.extract();
|
|
9
5
|
}
|
|
10
6
|
return pageProps;
|
|
11
7
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const client_1 = require("@apollo/client");
|
|
5
|
-
const api_1 = require("@ludo.ninja/api");
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { useMutation } from '@apollo/client';
|
|
3
|
+
import { hosts, assetSchema as schema } from '@ludo.ninja/api';
|
|
6
4
|
const useDisLikeAsset = () => {
|
|
7
|
-
const [isDisLiked, setDisLiked] =
|
|
8
|
-
const [mutate, { error }] =
|
|
5
|
+
const [isDisLiked, setDisLiked] = useState(false);
|
|
6
|
+
const [mutate, { error }] = useMutation(schema.DislikeAssetDocument, {
|
|
9
7
|
context: {
|
|
10
|
-
uri:
|
|
8
|
+
uri: hosts.assetsHost,
|
|
11
9
|
},
|
|
12
10
|
fetchPolicy: 'no-cache',
|
|
13
11
|
onCompleted: ({ dislikeAsset }) => {
|
|
@@ -29,4 +27,4 @@ const useDisLikeAsset = () => {
|
|
|
29
27
|
}
|
|
30
28
|
}
|
|
31
29
|
};
|
|
32
|
-
|
|
30
|
+
export default useDisLikeAsset;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const client_1 = require("@apollo/client");
|
|
5
|
-
const api_1 = require("@ludo.ninja/api");
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { useMutation } from '@apollo/client';
|
|
3
|
+
import { hosts, assetSchema as schema } from '@ludo.ninja/api';
|
|
6
4
|
const useLikeAsset = () => {
|
|
7
|
-
const [isLiked, setLike] =
|
|
8
|
-
const [mutate, { error }] =
|
|
5
|
+
const [isLiked, setLike] = useState(false);
|
|
6
|
+
const [mutate, { error }] = useMutation(schema.LikeAssetDocument, {
|
|
9
7
|
context: {
|
|
10
|
-
uri:
|
|
8
|
+
uri: hosts.assetsHost,
|
|
11
9
|
},
|
|
12
10
|
fetchPolicy: 'no-cache',
|
|
13
11
|
// refetchQueries: [schema.FetchLikedDocument],
|
|
@@ -30,4 +28,4 @@ const useLikeAsset = () => {
|
|
|
30
28
|
}
|
|
31
29
|
}
|
|
32
30
|
};
|
|
33
|
-
|
|
31
|
+
export default useLikeAsset;
|
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
exports.useFetchAssetByBlockchain = exports.prefetchAssetByBlockchain = void 0;
|
|
7
|
-
const react_1 = require("react");
|
|
8
|
-
const api_1 = require("@ludo.ninja/api");
|
|
9
|
-
const type_1 = require("@ludo.ninja/ui/build/system/Alert/type");
|
|
10
|
-
const ui_1 = require("../../../../store/ui");
|
|
11
|
-
const AssetEntity_1 = __importDefault(require("../../../../dto/AssetEntity"));
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { hosts, searchSchema as schema } from '@ludo.ninja/api';
|
|
3
|
+
import { alertVariants } from '@ludo.ninja/ui/build/system/Alert/type';
|
|
4
|
+
import { useUiStore } from "../../../../store/ui";
|
|
5
|
+
import AssetEntity from "../../../../dto/AssetEntity";
|
|
12
6
|
const prefetchAssetByBlockchain = async ({ blockchain, address, elrondId, tokenId, }, apolloClient) => {
|
|
13
7
|
return apolloClient
|
|
14
8
|
.query({
|
|
15
|
-
query:
|
|
9
|
+
query: schema.FetchAssetByBlockchainDocument,
|
|
16
10
|
variables: { blockchain, address, elrondId, tokenId },
|
|
17
|
-
context: { uri:
|
|
11
|
+
context: { uri: hosts.serverSearchHost }, // faster service assets for production,
|
|
18
12
|
fetchPolicy: 'network-only',
|
|
19
13
|
})
|
|
20
14
|
.catch(() => {
|
|
@@ -23,21 +17,20 @@ const prefetchAssetByBlockchain = async ({ blockchain, address, elrondId, tokenI
|
|
|
23
17
|
};
|
|
24
18
|
});
|
|
25
19
|
};
|
|
26
|
-
exports.prefetchAssetByBlockchain = prefetchAssetByBlockchain;
|
|
27
20
|
const useFetchAssetByBlockchain = ({ blockchain, address, elrondId, tokenId, }, prefetchedAsset) => {
|
|
28
|
-
const [asset, setAsset] =
|
|
29
|
-
const openAlert =
|
|
30
|
-
const { loading, error } =
|
|
21
|
+
const [asset, setAsset] = useState(prefetchedAsset);
|
|
22
|
+
const openAlert = useUiStore((state) => state.openAlert);
|
|
23
|
+
const { loading, error } = schema.useFetchAssetByBlockchainQuery({
|
|
31
24
|
variables: { blockchain, address, elrondId, tokenId },
|
|
32
25
|
context: {
|
|
33
|
-
uri:
|
|
26
|
+
uri: hosts.searchHost,
|
|
34
27
|
},
|
|
35
28
|
onCompleted: ({ fetchAssetByBlockchain }) => {
|
|
36
|
-
setAsset(new
|
|
29
|
+
setAsset(new AssetEntity(fetchAssetByBlockchain));
|
|
37
30
|
},
|
|
38
31
|
onError: () => {
|
|
39
32
|
openAlert({
|
|
40
|
-
type:
|
|
33
|
+
type: alertVariants.error,
|
|
41
34
|
caption: 'Oops, something went wrong.',
|
|
42
35
|
});
|
|
43
36
|
setAsset(null);
|
|
@@ -45,4 +38,4 @@ const useFetchAssetByBlockchain = ({ blockchain, address, elrondId, tokenId, },
|
|
|
45
38
|
});
|
|
46
39
|
return { clientData: asset, loading, error };
|
|
47
40
|
};
|
|
48
|
-
|
|
41
|
+
export { prefetchAssetByBlockchain, useFetchAssetByBlockchain };
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const api_1 = require("@ludo.ninja/api");
|
|
7
|
-
const type_1 = require("@ludo.ninja/ui/build/system/Alert/type");
|
|
8
|
-
const ui_1 = require("../../../../store/ui");
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { useLazyQuery } from '@apollo/client';
|
|
3
|
+
import { hosts, searchSchema as schema } from '@ludo.ninja/api';
|
|
4
|
+
import { alertVariants } from '@ludo.ninja/ui/build/system/Alert/type';
|
|
5
|
+
import { useUiStore } from "../../../../store/ui";
|
|
9
6
|
const useFetchAssetsByIds = ({ assetIds }) => {
|
|
10
|
-
const [assets, setAsset] =
|
|
11
|
-
const openAlert =
|
|
12
|
-
const [getAssets, { loading, error }] =
|
|
7
|
+
const [assets, setAsset] = useState(null);
|
|
8
|
+
const openAlert = useUiStore((state) => state.openAlert);
|
|
9
|
+
const [getAssets, { loading, error }] = useLazyQuery(schema.FetchAssetsDocument, {
|
|
13
10
|
variables: { assetIds },
|
|
14
11
|
context: {
|
|
15
|
-
uri:
|
|
12
|
+
uri: hosts.searchHost,
|
|
16
13
|
},
|
|
17
14
|
fetchPolicy: 'cache-first',
|
|
18
15
|
onCompleted: ({ fetchAssets: data }) => {
|
|
@@ -20,7 +17,7 @@ const useFetchAssetsByIds = ({ assetIds }) => {
|
|
|
20
17
|
},
|
|
21
18
|
onError: () => {
|
|
22
19
|
openAlert({
|
|
23
|
-
type:
|
|
20
|
+
type: alertVariants.error,
|
|
24
21
|
caption: 'Oops, something went wrong.',
|
|
25
22
|
});
|
|
26
23
|
setAsset(null);
|
|
@@ -28,4 +25,4 @@ const useFetchAssetsByIds = ({ assetIds }) => {
|
|
|
28
25
|
});
|
|
29
26
|
return [getAssets, { clientData: assets, loading, error }];
|
|
30
27
|
};
|
|
31
|
-
|
|
28
|
+
export { useFetchAssetsByIds };
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const type_1 = require("@ludo.ninja/ui/build/system/Alert/type");
|
|
7
|
-
const ui_1 = require("../../../../store/ui");
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { useQuery } from '@apollo/client';
|
|
3
|
+
import { hosts, searchSchema as schema } from '@ludo.ninja/api';
|
|
4
|
+
import { alertVariants } from '@ludo.ninja/ui/build/system/Alert/type';
|
|
5
|
+
import { useUiStore } from "../../../../store/ui";
|
|
8
6
|
const useFetchDynamicAssetLikes = ({ assetId, }) => {
|
|
9
|
-
const [isLikedByUser, setLikedByUser] =
|
|
10
|
-
const [likesByUser, setLikesByUser] =
|
|
11
|
-
const [loading, setLoading] =
|
|
12
|
-
const openAlert =
|
|
13
|
-
const { error } =
|
|
7
|
+
const [isLikedByUser, setLikedByUser] = useState(false);
|
|
8
|
+
const [likesByUser, setLikesByUser] = useState(0);
|
|
9
|
+
const [loading, setLoading] = useState(true);
|
|
10
|
+
const openAlert = useUiStore((state) => state.openAlert);
|
|
11
|
+
const { error } = useQuery(schema.FetchDynamicAssetLikesDocument, {
|
|
14
12
|
variables: { assetId },
|
|
15
13
|
context: {
|
|
16
|
-
uri:
|
|
14
|
+
uri: hosts.searchHost,
|
|
17
15
|
},
|
|
18
16
|
fetchPolicy: 'no-cache',
|
|
19
17
|
onCompleted: ({ fetchDynamicAssetData: data }) => {
|
|
@@ -23,7 +21,7 @@ const useFetchDynamicAssetLikes = ({ assetId, }) => {
|
|
|
23
21
|
},
|
|
24
22
|
onError: () => {
|
|
25
23
|
openAlert({
|
|
26
|
-
type:
|
|
24
|
+
type: alertVariants.error,
|
|
27
25
|
caption: 'Oops, something went wrong.',
|
|
28
26
|
});
|
|
29
27
|
setLikedByUser(false);
|
|
@@ -32,4 +30,4 @@ const useFetchDynamicAssetLikes = ({ assetId, }) => {
|
|
|
32
30
|
});
|
|
33
31
|
return { likesByUser, isLikedByUser, loading, error };
|
|
34
32
|
};
|
|
35
|
-
|
|
33
|
+
export default useFetchDynamicAssetLikes;
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const type_1 = require("@ludo.ninja/ui/build/system/Alert/type");
|
|
7
|
-
const ui_1 = require("../../../../store/ui");
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { useQuery } from '@apollo/client';
|
|
3
|
+
import { hosts, searchSchema as schema } from '@ludo.ninja/api';
|
|
4
|
+
import { alertVariants } from '@ludo.ninja/ui/build/system/Alert/type';
|
|
5
|
+
import { useUiStore } from "../../../../store/ui";
|
|
8
6
|
const useFetchDynamicAssetsLikes = ({ assetIds, }) => {
|
|
9
|
-
const [infoAssetsLikes, setInfoAssetsLikes] =
|
|
10
|
-
const openAlert =
|
|
11
|
-
const { loading, error } =
|
|
7
|
+
const [infoAssetsLikes, setInfoAssetsLikes] = useState(null);
|
|
8
|
+
const openAlert = useUiStore((state) => state.openAlert);
|
|
9
|
+
const { loading, error } = useQuery(schema.FetchDynamicAssetsLikesDocument, {
|
|
12
10
|
variables: { assetIds },
|
|
13
11
|
context: {
|
|
14
|
-
uri:
|
|
12
|
+
uri: hosts.searchHost,
|
|
15
13
|
},
|
|
16
14
|
fetchPolicy: 'no-cache',
|
|
17
15
|
onCompleted: ({ fetchDynamicAssetsData: data }) => {
|
|
@@ -19,7 +17,7 @@ const useFetchDynamicAssetsLikes = ({ assetIds, }) => {
|
|
|
19
17
|
},
|
|
20
18
|
onError: () => {
|
|
21
19
|
openAlert({
|
|
22
|
-
type:
|
|
20
|
+
type: alertVariants.error,
|
|
23
21
|
caption: 'Oops, something went wrong.',
|
|
24
22
|
});
|
|
25
23
|
setInfoAssetsLikes(null);
|
|
@@ -27,4 +25,4 @@ const useFetchDynamicAssetsLikes = ({ assetIds, }) => {
|
|
|
27
25
|
});
|
|
28
26
|
return { infoAssetsLikes, loading, error };
|
|
29
27
|
};
|
|
30
|
-
|
|
28
|
+
export default useFetchDynamicAssetsLikes;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const client_1 = require("@apollo/client");
|
|
5
|
-
const api_1 = require("@ludo.ninja/api");
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { useMutation } from '@apollo/client';
|
|
3
|
+
import { hosts, collectionsSchema as schema } from '@ludo.ninja/api';
|
|
6
4
|
const useDislikeCollection = () => {
|
|
7
|
-
const [isDisLiked, setDisLiked] =
|
|
8
|
-
const [mutate, { error }] =
|
|
5
|
+
const [isDisLiked, setDisLiked] = useState(false);
|
|
6
|
+
const [mutate, { error }] = useMutation(schema.DislikeCollectionDocument, {
|
|
9
7
|
context: {
|
|
10
|
-
uri:
|
|
8
|
+
uri: hosts.collectionsHost,
|
|
11
9
|
},
|
|
12
10
|
onCompleted: ({ dislikeCollection }) => {
|
|
13
11
|
setDisLiked(dislikeCollection);
|
|
@@ -28,4 +26,4 @@ const useDislikeCollection = () => {
|
|
|
28
26
|
}
|
|
29
27
|
}
|
|
30
28
|
};
|
|
31
|
-
|
|
29
|
+
export default useDislikeCollection;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const client_1 = require("@apollo/client");
|
|
5
|
-
const api_1 = require("@ludo.ninja/api");
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { useMutation } from '@apollo/client';
|
|
3
|
+
import { hosts, collectionsSchema as schema } from '@ludo.ninja/api';
|
|
6
4
|
const useLikeCollection = () => {
|
|
7
|
-
const [isLiked, setLike] =
|
|
8
|
-
const [mutate, { error }] =
|
|
5
|
+
const [isLiked, setLike] = useState(false);
|
|
6
|
+
const [mutate, { error }] = useMutation(schema.LikeCollectionDocument, {
|
|
9
7
|
context: {
|
|
10
|
-
uri:
|
|
8
|
+
uri: hosts.collectionsHost,
|
|
11
9
|
},
|
|
12
10
|
onCompleted: ({ likeCollection }) => {
|
|
13
11
|
setLike(likeCollection);
|
|
@@ -28,4 +26,4 @@ const useLikeCollection = () => {
|
|
|
28
26
|
}
|
|
29
27
|
}
|
|
30
28
|
};
|
|
31
|
-
|
|
29
|
+
export default useLikeCollection;
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const ui_1 = require("../../../../store/ui");
|
|
10
|
-
const notifications_1 = require("../../../../modules/notifications");
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
import { useRouter } from 'next/router';
|
|
3
|
+
import { useLazyQuery } from '@apollo/client';
|
|
4
|
+
import { authCookies, hosts, experiencesSchema as schema, } from '@ludo.ninja/api';
|
|
5
|
+
import { alertVariants } from '@ludo.ninja/ui/build/system/Alert/type';
|
|
6
|
+
import { useUserStore } from "../../../../modules/user/store";
|
|
7
|
+
import { useUiStore } from "../../../../store/ui";
|
|
8
|
+
import { createXpNotification } from "../../../../modules/notifications";
|
|
11
9
|
const useFetchMyExperienceWithLevel = () => {
|
|
12
|
-
const { user, isSignedIn, setUserExp, resetUserExp, setErrorExp, setIsLoadingExp, } =
|
|
10
|
+
const { user, isSignedIn, setUserExp, resetUserExp, setErrorExp, setIsLoadingExp, } = useUserStore((state) => ({
|
|
13
11
|
user: state.user,
|
|
14
12
|
isSignedIn: state.isSignedIn,
|
|
15
13
|
setUserExp: state.setUserExp,
|
|
@@ -17,15 +15,15 @@ const useFetchMyExperienceWithLevel = () => {
|
|
|
17
15
|
setErrorExp: state.setErrorExp,
|
|
18
16
|
setIsLoadingExp: state.setIsLoadingExp,
|
|
19
17
|
}));
|
|
20
|
-
const { openAlert, addNotification } =
|
|
18
|
+
const { openAlert, addNotification } = useUiStore((state) => ({
|
|
21
19
|
openAlert: state.openAlert,
|
|
22
20
|
addNotification: state.addNotification,
|
|
23
21
|
}));
|
|
24
|
-
const router =
|
|
22
|
+
const router = useRouter();
|
|
25
23
|
const userId = user?.userId || '';
|
|
26
|
-
const [fetchExp, { subscribeToMore }] =
|
|
24
|
+
const [fetchExp, { subscribeToMore }] = useLazyQuery(schema.FetchMyExperienceV2Document, {
|
|
27
25
|
context: {
|
|
28
|
-
uri:
|
|
26
|
+
uri: hosts.experiencesHost,
|
|
29
27
|
},
|
|
30
28
|
onCompleted: ({ fetchMyExperienceV2: { xps, level, levelMaxXps, levelMinXps }, }) => {
|
|
31
29
|
setIsLoadingExp(false);
|
|
@@ -39,7 +37,7 @@ const useFetchMyExperienceWithLevel = () => {
|
|
|
39
37
|
},
|
|
40
38
|
onError: (err) => {
|
|
41
39
|
openAlert({
|
|
42
|
-
type:
|
|
40
|
+
type: alertVariants.error,
|
|
43
41
|
caption: err.message,
|
|
44
42
|
});
|
|
45
43
|
resetUserExp();
|
|
@@ -48,16 +46,16 @@ const useFetchMyExperienceWithLevel = () => {
|
|
|
48
46
|
},
|
|
49
47
|
});
|
|
50
48
|
const subscribe = () => {
|
|
51
|
-
const { authToken } =
|
|
49
|
+
const { authToken } = authCookies.getCookies();
|
|
52
50
|
subscribeToMore({
|
|
53
51
|
variables: { authToken },
|
|
54
|
-
document:
|
|
52
|
+
document: schema.OnMyExperienceIncrementedDocument,
|
|
55
53
|
updateQuery: (prev, { subscriptionData: { data } }) => {
|
|
56
54
|
if (!data)
|
|
57
55
|
return prev;
|
|
58
56
|
const { xps, level, levelMaxXps, levelMinXps, xpsIncrement, description, } = data.onMyExperienceIncremented;
|
|
59
57
|
if (xpsIncrement) {
|
|
60
|
-
addNotification(
|
|
58
|
+
addNotification(createXpNotification({
|
|
61
59
|
xpsIncrement,
|
|
62
60
|
...(description ? { description } : {}),
|
|
63
61
|
onClick: () => {
|
|
@@ -74,11 +72,11 @@ const useFetchMyExperienceWithLevel = () => {
|
|
|
74
72
|
},
|
|
75
73
|
});
|
|
76
74
|
};
|
|
77
|
-
|
|
75
|
+
useEffect(() => {
|
|
78
76
|
if (isSignedIn) {
|
|
79
77
|
setIsLoadingExp(true);
|
|
80
78
|
fetchExp();
|
|
81
79
|
}
|
|
82
80
|
}, [isSignedIn]);
|
|
83
81
|
};
|
|
84
|
-
|
|
82
|
+
export default useFetchMyExperienceWithLevel;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
const type_1 = require("@ludo.ninja/ui/build/system/Alert/type");
|
|
8
|
-
const ui_1 = require("../../../../store/ui");
|
|
9
|
-
const prefetchMyTasks = (apolloClient) => {
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { useQuery } from '@apollo/client';
|
|
3
|
+
import { hosts, experiencesSchema as schema } from '@ludo.ninja/api';
|
|
4
|
+
import { alertVariants } from '@ludo.ninja/ui/build/system/Alert/type';
|
|
5
|
+
import { useUiStore } from "../../../../store/ui";
|
|
6
|
+
export const prefetchMyTasks = (apolloClient) => {
|
|
10
7
|
return apolloClient
|
|
11
8
|
.query({
|
|
12
|
-
query:
|
|
13
|
-
context: { uri:
|
|
9
|
+
query: schema.FetchMyTasksDocument,
|
|
10
|
+
context: { uri: hosts.serverExperiencesHost },
|
|
14
11
|
fetchPolicy: 'network-only',
|
|
15
12
|
})
|
|
16
13
|
.catch(() => {
|
|
@@ -19,20 +16,19 @@ const prefetchMyTasks = (apolloClient) => {
|
|
|
19
16
|
};
|
|
20
17
|
});
|
|
21
18
|
};
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const { data, error, loading } = (0, client_1.useQuery)(api_1.experiencesSchema.FetchMyTasksDocument, {
|
|
19
|
+
export const useFetchMyTasks = ({ prefetchedMyTasks, }) => {
|
|
20
|
+
const [myTasks, setMyTasks] = useState(prefetchedMyTasks);
|
|
21
|
+
const openAlert = useUiStore((state) => state.openAlert);
|
|
22
|
+
const { data, error, loading } = useQuery(schema.FetchMyTasksDocument, {
|
|
27
23
|
context: {
|
|
28
|
-
uri:
|
|
24
|
+
uri: hosts.experiencesHost,
|
|
29
25
|
},
|
|
30
26
|
onCompleted: ({ fetchMyTasks }) => {
|
|
31
27
|
setMyTasks(fetchMyTasks);
|
|
32
28
|
},
|
|
33
29
|
onError: (err) => {
|
|
34
30
|
openAlert({
|
|
35
|
-
type:
|
|
31
|
+
type: alertVariants.error,
|
|
36
32
|
caption: err.message,
|
|
37
33
|
});
|
|
38
34
|
setMyTasks([]);
|
|
@@ -45,5 +41,4 @@ const useFetchMyTasks = ({ prefetchedMyTasks, }) => {
|
|
|
45
41
|
clientMyTasksData: myTasks,
|
|
46
42
|
};
|
|
47
43
|
};
|
|
48
|
-
|
|
49
|
-
exports.default = { useFetchMyTasks: exports.useFetchMyTasks, prefetchMyTasks: exports.prefetchMyTasks };
|
|
44
|
+
export default { useFetchMyTasks, prefetchMyTasks };
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const client_1 = require("@apollo/client");
|
|
6
|
-
const api_1 = require("@ludo.ninja/api");
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { useMutation } from '@apollo/client';
|
|
3
|
+
import { hosts, galleriesSchema as schema } from '@ludo.ninja/api';
|
|
7
4
|
const useAddAssetsToGalleryV2 = () => {
|
|
8
|
-
const [isAdded, setAdd] =
|
|
9
|
-
const [mutate, { error }] =
|
|
5
|
+
const [isAdded, setAdd] = useState(false);
|
|
6
|
+
const [mutate, { error }] = useMutation(schema.AddAssetsToGalleryV2Document, {
|
|
10
7
|
context: {
|
|
11
|
-
uri:
|
|
8
|
+
uri: hosts.galleriesHost,
|
|
12
9
|
},
|
|
13
10
|
fetchPolicy: 'no-cache',
|
|
14
11
|
onCompleted: ({ addAssetsToGalleryV2 }) => {
|
|
@@ -16,8 +13,8 @@ const useAddAssetsToGalleryV2 = () => {
|
|
|
16
13
|
},
|
|
17
14
|
notifyOnNetworkStatusChange: true,
|
|
18
15
|
refetchQueries: [
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
schema.FetchUserFavoritesV2Document,
|
|
17
|
+
schema.FetchUserGalleriesV2Document,
|
|
21
18
|
],
|
|
22
19
|
// onError: (err) => console.log(err),
|
|
23
20
|
});
|
|
@@ -33,4 +30,4 @@ const useAddAssetsToGalleryV2 = () => {
|
|
|
33
30
|
}
|
|
34
31
|
}
|
|
35
32
|
};
|
|
36
|
-
|
|
33
|
+
export { useAddAssetsToGalleryV2 };
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const useAddChangeGalleryBanner = () => {
|
|
9
|
-
const openAlert = (0, ui_1.useUiStore)((state) => state.openAlert);
|
|
10
|
-
const [mutate] = (0, client_1.useMutation)(api_1.mediasSchema.UploadGalleryBannerDocument, {
|
|
1
|
+
import { useMutation } from '@apollo/client';
|
|
2
|
+
import { hosts, mediasSchema as schema } from '@ludo.ninja/api';
|
|
3
|
+
import { alertVariants } from '@ludo.ninja/ui/build/system/Alert/type';
|
|
4
|
+
import { useUiStore } from "../../../../store/ui";
|
|
5
|
+
export const useAddChangeGalleryBanner = () => {
|
|
6
|
+
const openAlert = useUiStore((state) => state.openAlert);
|
|
7
|
+
const [mutate] = useMutation(schema.UploadGalleryBannerDocument, {
|
|
11
8
|
context: {
|
|
12
|
-
uri:
|
|
9
|
+
uri: hosts.mediasHost,
|
|
13
10
|
},
|
|
14
11
|
fetchPolicy: 'no-cache',
|
|
15
12
|
onCompleted: () => {
|
|
16
13
|
openAlert({
|
|
17
|
-
type:
|
|
14
|
+
type: alertVariants.success,
|
|
18
15
|
caption: 'Banner successfully added!',
|
|
19
16
|
text: '',
|
|
20
17
|
});
|
|
@@ -27,4 +24,3 @@ const useAddChangeGalleryBanner = () => {
|
|
|
27
24
|
}
|
|
28
25
|
return { addBanner };
|
|
29
26
|
};
|
|
30
|
-
exports.useAddChangeGalleryBanner = useAddChangeGalleryBanner;
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const client_1 = require("@apollo/client");
|
|
6
|
-
const api_1 = require("@ludo.ninja/api");
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { useMutation } from '@apollo/client';
|
|
3
|
+
import { hosts, galleriesSchema as schema } from '@ludo.ninja/api';
|
|
7
4
|
const useAddCollectionsToGalleryV2 = () => {
|
|
8
|
-
const [isAdded, setAdd] =
|
|
9
|
-
const [mutate, { error }] =
|
|
5
|
+
const [isAdded, setAdd] = useState(false);
|
|
6
|
+
const [mutate, { error }] = useMutation(schema.AddCollectionsToGalleryV2Document, {
|
|
10
7
|
context: {
|
|
11
|
-
uri:
|
|
8
|
+
uri: hosts.galleriesHost,
|
|
12
9
|
},
|
|
13
10
|
fetchPolicy: 'no-cache',
|
|
14
11
|
onCompleted: ({ addCollectionsToGallery }) => {
|
|
15
12
|
setAdd(addCollectionsToGallery);
|
|
16
13
|
},
|
|
17
14
|
refetchQueries: [
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
schema.FetchUserFavoritesV2Document,
|
|
16
|
+
schema.FetchUserGalleriesV2Document,
|
|
20
17
|
],
|
|
21
18
|
// onError: (err) => console.log(err),
|
|
22
19
|
});
|
|
@@ -32,4 +29,4 @@ const useAddCollectionsToGalleryV2 = () => {
|
|
|
32
29
|
}
|
|
33
30
|
}
|
|
34
31
|
};
|
|
35
|
-
|
|
32
|
+
export { useAddCollectionsToGalleryV2 };
|
|
@@ -1,30 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const api_1 = require("@ludo.ninja/api");
|
|
7
|
-
const type_1 = require("@ludo.ninja/ui/build/system/Alert/type");
|
|
8
|
-
const ui_1 = require("../../../../store/ui");
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { useMutation } from '@apollo/client';
|
|
3
|
+
import { hosts, galleriesSchema as schema } from '@ludo.ninja/api';
|
|
4
|
+
import { alertVariants } from '@ludo.ninja/ui/build/system/Alert/type';
|
|
5
|
+
import { useUiStore } from "../../../../store/ui";
|
|
9
6
|
const useAddCreationsToGalleryV2 = () => {
|
|
10
|
-
const [isAdded, setAdd] =
|
|
11
|
-
const openAlert =
|
|
12
|
-
const [mutate, { error }] =
|
|
7
|
+
const [isAdded, setAdd] = useState(false);
|
|
8
|
+
const openAlert = useUiStore((state) => state.openAlert);
|
|
9
|
+
const [mutate, { error }] = useMutation(schema.AddCreationsToGalleryV2Document, {
|
|
13
10
|
context: {
|
|
14
|
-
uri:
|
|
11
|
+
uri: hosts.galleriesHost,
|
|
15
12
|
},
|
|
16
13
|
fetchPolicy: 'no-cache',
|
|
17
14
|
onCompleted: ({ addCreationsToGalleryV2 }) => {
|
|
18
15
|
setAdd(addCreationsToGalleryV2);
|
|
19
16
|
openAlert({
|
|
20
|
-
type:
|
|
17
|
+
type: alertVariants.success,
|
|
21
18
|
text: '',
|
|
22
19
|
// caption: 'Successfully added',
|
|
23
20
|
});
|
|
24
21
|
},
|
|
25
22
|
refetchQueries: [
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
schema.FetchUserFavoritesV2Document,
|
|
24
|
+
schema.FetchUserGalleriesV2Document,
|
|
28
25
|
],
|
|
29
26
|
// onError: (err) => console.log(err),
|
|
30
27
|
});
|
|
@@ -40,4 +37,4 @@ const useAddCreationsToGalleryV2 = () => {
|
|
|
40
37
|
}
|
|
41
38
|
}
|
|
42
39
|
};
|
|
43
|
-
|
|
40
|
+
export { useAddCreationsToGalleryV2 };
|