@ludo.ninja/components 2.0.9 → 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 +2 -3
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const data_1 = require("@ludo.ninja/ui/build/system/Alert/data");
|
|
6
|
-
const ui_1 = require("../../../../store/ui");
|
|
1
|
+
import { useMutation } from '@apollo/client';
|
|
2
|
+
import { hosts, identitySchema as schema } from '@ludo.ninja/api';
|
|
3
|
+
import { alertError, alertSuccess, } from '@ludo.ninja/ui/build/system/Alert/data';
|
|
4
|
+
import { useUiStore } from "../../../../store/ui";
|
|
7
5
|
const useAddWalletMetamask = () => {
|
|
8
|
-
const openAlert =
|
|
9
|
-
const [mutate, { error }] =
|
|
6
|
+
const openAlert = useUiStore((state) => state.openAlert);
|
|
7
|
+
const [mutate, { error }] = useMutation(schema.AddWalletMetamaskDocument, {
|
|
10
8
|
context: {
|
|
11
|
-
uri:
|
|
9
|
+
uri: hosts.identityHost,
|
|
12
10
|
},
|
|
13
11
|
onCompleted: () => {
|
|
14
12
|
openAlert({
|
|
15
|
-
...
|
|
13
|
+
...alertSuccess,
|
|
16
14
|
caption: 'Metamask wallet successfully added !',
|
|
17
15
|
text: '',
|
|
18
16
|
});
|
|
19
17
|
},
|
|
20
18
|
onError: (err) => {
|
|
21
19
|
openAlert({
|
|
22
|
-
...
|
|
20
|
+
...alertError,
|
|
23
21
|
caption: err.message,
|
|
24
22
|
text: '',
|
|
25
23
|
});
|
|
@@ -36,4 +34,4 @@ const useAddWalletMetamask = () => {
|
|
|
36
34
|
}
|
|
37
35
|
}
|
|
38
36
|
};
|
|
39
|
-
|
|
37
|
+
export default useAddWalletMetamask;
|
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const data_1 = require("@ludo.ninja/ui/build/system/Alert/data");
|
|
6
|
-
const ui_1 = require("../../../../store/ui");
|
|
1
|
+
import { useMutation } from '@apollo/client';
|
|
2
|
+
import { hosts, identitySchema as schema } from '@ludo.ninja/api';
|
|
3
|
+
import { alertError, alertSuccess, } from '@ludo.ninja/ui/build/system/Alert/data';
|
|
4
|
+
import { useUiStore } from "../../../../store/ui";
|
|
7
5
|
const useAddWalletSolana = () => {
|
|
8
|
-
const openAlert =
|
|
9
|
-
const [mutate] =
|
|
6
|
+
const openAlert = useUiStore((state) => state.openAlert);
|
|
7
|
+
const [mutate] = useMutation(schema.AddWalletSolanaDocument, {
|
|
10
8
|
context: {
|
|
11
|
-
uri:
|
|
9
|
+
uri: hosts.identityHost,
|
|
12
10
|
},
|
|
13
11
|
onCompleted: () => {
|
|
14
12
|
openAlert({
|
|
15
|
-
...
|
|
13
|
+
...alertSuccess,
|
|
16
14
|
caption: 'Solana wallet successfully added !',
|
|
17
15
|
text: '',
|
|
18
16
|
});
|
|
19
17
|
},
|
|
20
18
|
onError: (err) => {
|
|
21
19
|
openAlert({
|
|
22
|
-
...
|
|
20
|
+
...alertError,
|
|
23
21
|
caption: err.message,
|
|
24
22
|
text: '',
|
|
25
23
|
});
|
|
@@ -32,4 +30,4 @@ const useAddWalletSolana = () => {
|
|
|
32
30
|
});
|
|
33
31
|
}
|
|
34
32
|
};
|
|
35
|
-
|
|
33
|
+
export default useAddWalletSolana;
|
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const data_1 = require("@ludo.ninja/ui/build/system/Alert/data");
|
|
6
|
-
const ui_1 = require("../../../../store/ui");
|
|
1
|
+
import { useMutation } from '@apollo/client';
|
|
2
|
+
import { hosts, identitySchema as schema } from '@ludo.ninja/api';
|
|
3
|
+
import { alertError, alertSuccess, } from '@ludo.ninja/ui/build/system/Alert/data';
|
|
4
|
+
import { useUiStore } from "../../../../store/ui";
|
|
7
5
|
const useAddWalletTezos = () => {
|
|
8
|
-
const openAlert =
|
|
9
|
-
const [mutate] =
|
|
6
|
+
const openAlert = useUiStore((state) => state.openAlert);
|
|
7
|
+
const [mutate] = useMutation(schema.AddWalletTezosDocument, {
|
|
10
8
|
context: {
|
|
11
|
-
uri:
|
|
9
|
+
uri: hosts.identityHost,
|
|
12
10
|
},
|
|
13
11
|
onCompleted: () => {
|
|
14
12
|
openAlert({
|
|
15
|
-
...
|
|
13
|
+
...alertSuccess,
|
|
16
14
|
caption: 'Tezos wallet successfully added !',
|
|
17
15
|
text: '',
|
|
18
16
|
});
|
|
19
17
|
},
|
|
20
18
|
onError: (err) => {
|
|
21
19
|
openAlert({
|
|
22
|
-
...
|
|
20
|
+
...alertError,
|
|
23
21
|
caption: err.message,
|
|
24
22
|
text: '',
|
|
25
23
|
});
|
|
@@ -32,4 +30,4 @@ const useAddWalletTezos = () => {
|
|
|
32
30
|
});
|
|
33
31
|
}
|
|
34
32
|
};
|
|
35
|
-
|
|
33
|
+
export default useAddWalletTezos;
|
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
const ui_1 = require("../../../../store/ui");
|
|
8
|
-
const FOLLOW_PROFILE_MUTATION = (0, client_1.gql) `
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { gql, useMutation } from '@apollo/client';
|
|
3
|
+
import { hosts } from '@ludo.ninja/api';
|
|
4
|
+
import { alertVariants } from '@ludo.ninja/ui/build/system/Alert/type';
|
|
5
|
+
import { useUiStore } from "../../../../store/ui";
|
|
6
|
+
const FOLLOW_PROFILE_MUTATION = gql `
|
|
9
7
|
mutation FollowProfile($followingUserId: ID!) {
|
|
10
8
|
followProfile(followingUserId: $followingUserId)
|
|
11
9
|
}
|
|
12
10
|
`;
|
|
13
11
|
const useFollowProfile = (followingUserId) => {
|
|
14
|
-
const [isFollowedProfile, setIsFollowed] =
|
|
15
|
-
const openAlert =
|
|
16
|
-
const [followProfile] =
|
|
12
|
+
const [isFollowedProfile, setIsFollowed] = useState(false);
|
|
13
|
+
const openAlert = useUiStore((state) => state.openAlert);
|
|
14
|
+
const [followProfile] = useMutation(FOLLOW_PROFILE_MUTATION, {
|
|
17
15
|
variables: { followingUserId },
|
|
18
16
|
context: {
|
|
19
|
-
uri:
|
|
17
|
+
uri: hosts.identityHost,
|
|
20
18
|
},
|
|
21
19
|
fetchPolicy: 'no-cache',
|
|
22
20
|
onCompleted: ({ followProfile }) => {
|
|
23
21
|
setIsFollowed(followProfile);
|
|
24
22
|
openAlert({
|
|
25
|
-
type:
|
|
23
|
+
type: alertVariants.success,
|
|
26
24
|
caption: 'You successfully subscribed!',
|
|
27
25
|
text: '',
|
|
28
26
|
});
|
|
@@ -30,11 +28,11 @@ const useFollowProfile = (followingUserId) => {
|
|
|
30
28
|
onError: (err) => {
|
|
31
29
|
setIsFollowed(false);
|
|
32
30
|
openAlert({
|
|
33
|
-
type:
|
|
31
|
+
type: alertVariants.error,
|
|
34
32
|
caption: err.message,
|
|
35
33
|
});
|
|
36
34
|
},
|
|
37
35
|
});
|
|
38
36
|
return { followProfile, isFollowedProfile };
|
|
39
37
|
};
|
|
40
|
-
|
|
38
|
+
export default useFollowProfile;
|
|
@@ -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, identitySchema as schema } from '@ludo.ninja/api';
|
|
6
4
|
const useGenerateNewInviteCodes = () => {
|
|
7
|
-
const [generatedCodes, setGeneratedCodes] =
|
|
8
|
-
const [mutate, { error }] =
|
|
5
|
+
const [generatedCodes, setGeneratedCodes] = useState(null);
|
|
6
|
+
const [mutate, { error }] = useMutation(schema.GenerateNewInviteCodesDocument, {
|
|
9
7
|
context: {
|
|
10
|
-
uri:
|
|
8
|
+
uri: hosts.identityHost,
|
|
11
9
|
},
|
|
12
10
|
onCompleted: ({ generateNewInviteCodes }) => {
|
|
13
11
|
setGeneratedCodes(generateNewInviteCodes);
|
|
@@ -28,4 +26,4 @@ const useGenerateNewInviteCodes = () => {
|
|
|
28
26
|
}
|
|
29
27
|
}
|
|
30
28
|
};
|
|
31
|
-
|
|
29
|
+
export default useGenerateNewInviteCodes;
|
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const data_1 = require("@ludo.ninja/ui/build/system/Alert/data");
|
|
5
|
-
const ui_1 = require("../../../../store/ui");
|
|
1
|
+
import { hosts, identitySchema as schema } from '@ludo.ninja/api';
|
|
2
|
+
import { alertError, alertSuccess, } from '@ludo.ninja/ui/build/system/Alert/data';
|
|
3
|
+
import { useUiStore } from "../../../../store/ui";
|
|
6
4
|
const useInviteCode = () => {
|
|
7
|
-
const openAlert =
|
|
8
|
-
const [mutate, { error, loading }] =
|
|
5
|
+
const openAlert = useUiStore((state) => state.openAlert);
|
|
6
|
+
const [mutate, { error, loading }] = schema.useUseInviteCodeMutation({
|
|
9
7
|
context: {
|
|
10
|
-
uri:
|
|
8
|
+
uri: hosts.identityHost,
|
|
11
9
|
},
|
|
12
10
|
onCompleted: () => {
|
|
13
11
|
openAlert({
|
|
14
|
-
...
|
|
12
|
+
...alertSuccess,
|
|
15
13
|
caption: 'Success!',
|
|
16
14
|
text: 'Invite code applied',
|
|
17
15
|
});
|
|
18
16
|
},
|
|
19
17
|
onError: (err) => {
|
|
20
18
|
openAlert({
|
|
21
|
-
...
|
|
19
|
+
...alertError,
|
|
22
20
|
caption: err.message,
|
|
23
21
|
text: '',
|
|
24
22
|
});
|
|
@@ -31,4 +29,4 @@ const useInviteCode = () => {
|
|
|
31
29
|
});
|
|
32
30
|
}
|
|
33
31
|
};
|
|
34
|
-
|
|
32
|
+
export default useInviteCode;
|
|
@@ -1,27 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const data_1 = require("@ludo.ninja/ui/build/system/Alert/data");
|
|
5
|
-
const ui_1 = require("../../../../store/ui");
|
|
1
|
+
import { hosts, identitySchema as schema } from '@ludo.ninja/api';
|
|
2
|
+
import { alertError } from '@ludo.ninja/ui/build/system/Alert/data';
|
|
3
|
+
import { useUiStore } from "../../../../store/ui";
|
|
6
4
|
const useRemoveWallet = ({ userId }) => {
|
|
7
|
-
const openAlert =
|
|
8
|
-
const [mutate, { error }] =
|
|
5
|
+
const openAlert = useUiStore((state) => state.openAlert);
|
|
6
|
+
const [mutate, { error }] = schema.useRemoveWalletMutation({
|
|
9
7
|
context: {
|
|
10
|
-
uri:
|
|
8
|
+
uri: hosts.identityHost,
|
|
11
9
|
},
|
|
12
10
|
refetchQueries: [
|
|
13
11
|
{
|
|
14
|
-
query:
|
|
12
|
+
query: schema.FetchUserWalletsDocument,
|
|
15
13
|
fetchPolicy: 'no-cache',
|
|
16
14
|
context: {
|
|
17
|
-
uri:
|
|
15
|
+
uri: hosts.identityHost,
|
|
18
16
|
},
|
|
19
17
|
variables: { userId },
|
|
20
18
|
},
|
|
21
19
|
],
|
|
22
20
|
onError: (err) => {
|
|
23
21
|
openAlert({
|
|
24
|
-
...
|
|
22
|
+
...alertError,
|
|
25
23
|
caption: err.message,
|
|
26
24
|
text: '',
|
|
27
25
|
});
|
|
@@ -34,4 +32,4 @@ const useRemoveWallet = ({ userId }) => {
|
|
|
34
32
|
});
|
|
35
33
|
}
|
|
36
34
|
};
|
|
37
|
-
|
|
35
|
+
export default useRemoveWallet;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const client_1 = require("@apollo/client");
|
|
4
|
-
const api_1 = require("@ludo.ninja/api");
|
|
1
|
+
import { useMutation } from '@apollo/client';
|
|
2
|
+
import { hosts, authSchema as schema } from '@ludo.ninja/api';
|
|
5
3
|
const useRevokeToken = () => {
|
|
6
|
-
const [mutate] =
|
|
4
|
+
const [mutate] = useMutation(schema.RevokeTokenDocument, {
|
|
7
5
|
context: {
|
|
8
|
-
uri:
|
|
6
|
+
uri: hosts.authHost,
|
|
9
7
|
},
|
|
10
8
|
});
|
|
11
9
|
return { revokeToken };
|
|
@@ -18,4 +16,4 @@ const useRevokeToken = () => {
|
|
|
18
16
|
}
|
|
19
17
|
}
|
|
20
18
|
};
|
|
21
|
-
|
|
19
|
+
export default useRevokeToken;
|
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const data_1 = require("@ludo.ninja/ui/build/system/Alert/data");
|
|
5
|
-
const ui_1 = require("../../../../store/ui");
|
|
1
|
+
import { hosts, identitySchema as schema } from '@ludo.ninja/api';
|
|
2
|
+
import { alertError, alertSuccess, } from '@ludo.ninja/ui/build/system/Alert/data';
|
|
3
|
+
import { useUiStore } from "../../../../store/ui";
|
|
6
4
|
const useSaveEmailOfJoiner = () => {
|
|
7
|
-
const openAlert =
|
|
8
|
-
const [mutate, { error, loading }] =
|
|
5
|
+
const openAlert = useUiStore((state) => state.openAlert);
|
|
6
|
+
const [mutate, { error, loading }] = schema.useSaveEmailOfJoinerMutation({
|
|
9
7
|
context: {
|
|
10
|
-
uri:
|
|
8
|
+
uri: hosts.identityHost,
|
|
11
9
|
},
|
|
12
10
|
onCompleted: () => {
|
|
13
11
|
openAlert({
|
|
14
|
-
...
|
|
12
|
+
...alertSuccess,
|
|
15
13
|
caption: 'Success!',
|
|
16
14
|
text: 'You subscribed',
|
|
17
15
|
});
|
|
18
16
|
},
|
|
19
17
|
onError: (err) => {
|
|
20
18
|
openAlert({
|
|
21
|
-
...
|
|
19
|
+
...alertError,
|
|
22
20
|
caption: err.message,
|
|
23
21
|
text: '',
|
|
24
22
|
});
|
|
@@ -31,4 +29,4 @@ const useSaveEmailOfJoiner = () => {
|
|
|
31
29
|
});
|
|
32
30
|
}
|
|
33
31
|
};
|
|
34
|
-
|
|
32
|
+
export default useSaveEmailOfJoiner;
|
|
@@ -1,34 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
const ui_1 = require("../../../../store/ui");
|
|
8
|
-
const UNFOLLOW_PROFILE_MUTATION = (0, client_1.gql) `
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { gql, useMutation } from '@apollo/client';
|
|
3
|
+
import { hosts } from '@ludo.ninja/api';
|
|
4
|
+
import { alertVariants } from '@ludo.ninja/ui/build/system/Alert/type';
|
|
5
|
+
import { useUiStore } from "../../../../store/ui";
|
|
6
|
+
const UNFOLLOW_PROFILE_MUTATION = gql `
|
|
9
7
|
mutation UnfollowProfile($followingUserId: ID!) {
|
|
10
8
|
unfollowProfile(followingUserId: $followingUserId)
|
|
11
9
|
}
|
|
12
10
|
`;
|
|
13
11
|
const useUnfollowProfile = (followingUserId) => {
|
|
14
|
-
const [isUnFollowedProfile, setIsUnFollowed] =
|
|
15
|
-
const openAlert =
|
|
16
|
-
const [unfollowProfile, {}] =
|
|
12
|
+
const [isUnFollowedProfile, setIsUnFollowed] = useState(false);
|
|
13
|
+
const openAlert = useUiStore((state) => state.openAlert);
|
|
14
|
+
const [unfollowProfile, {}] = useMutation(UNFOLLOW_PROFILE_MUTATION, {
|
|
17
15
|
variables: { followingUserId },
|
|
18
16
|
context: {
|
|
19
|
-
uri:
|
|
17
|
+
uri: hosts.identityHost,
|
|
20
18
|
},
|
|
21
19
|
onCompleted: ({ unfollowProfile }) => {
|
|
22
20
|
setIsUnFollowed(unfollowProfile);
|
|
23
21
|
openAlert({
|
|
24
|
-
type:
|
|
22
|
+
type: alertVariants.success,
|
|
25
23
|
caption: 'You successfully unsubscribed!',
|
|
26
24
|
text: '',
|
|
27
25
|
});
|
|
28
26
|
},
|
|
29
27
|
onError: (err) => {
|
|
30
28
|
openAlert({
|
|
31
|
-
type:
|
|
29
|
+
type: alertVariants.error,
|
|
32
30
|
caption: err.message,
|
|
33
31
|
});
|
|
34
32
|
setIsUnFollowed(false);
|
|
@@ -36,4 +34,4 @@ const useUnfollowProfile = (followingUserId) => {
|
|
|
36
34
|
});
|
|
37
35
|
return { unfollowProfile, isUnFollowedProfile };
|
|
38
36
|
};
|
|
39
|
-
|
|
37
|
+
export default useUnfollowProfile;
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const type_1 = require("@ludo.ninja/ui/build/system/Alert/type");
|
|
9
|
-
const store_1 = require("../../../../modules/user/store");
|
|
10
|
-
const ui_1 = require("../../../../store/ui");
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import { useLazyQuery, } from '@apollo/client';
|
|
3
|
+
import { hosts, identitySchema as schema } from '@ludo.ninja/api';
|
|
4
|
+
import { ProfileEntity } from '@ludo.ninja/core';
|
|
5
|
+
import { alertVariants } from '@ludo.ninja/ui/build/system/Alert/type';
|
|
6
|
+
import { useUserStore } from "../../../../modules/user/store";
|
|
7
|
+
import { useUiStore } from "../../../../store/ui";
|
|
11
8
|
const prefetchProfile = ({ userId }, apolloClient) => {
|
|
12
9
|
return apolloClient
|
|
13
10
|
.query({
|
|
14
|
-
query:
|
|
11
|
+
query: schema.FetchProfileDocument,
|
|
15
12
|
variables: { userId },
|
|
16
|
-
context: { uri:
|
|
13
|
+
context: { uri: hosts.serverIdentityHost },
|
|
17
14
|
fetchPolicy: 'network-only',
|
|
18
15
|
})
|
|
19
16
|
.catch(() => {
|
|
@@ -22,35 +19,34 @@ const prefetchProfile = ({ userId }, apolloClient) => {
|
|
|
22
19
|
};
|
|
23
20
|
});
|
|
24
21
|
};
|
|
25
|
-
exports.prefetchProfile = prefetchProfile;
|
|
26
22
|
const useFetchProfile = ({ userId }, prefetchedProfile) => {
|
|
27
|
-
const [profile, setProfile] =
|
|
28
|
-
const [isLoading, setIsLoading] =
|
|
29
|
-
const openAlert =
|
|
30
|
-
const { profileData, isLoadingProfileData, user } =
|
|
23
|
+
const [profile, setProfile] = useState(prefetchedProfile);
|
|
24
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
25
|
+
const openAlert = useUiStore((state) => state.openAlert);
|
|
26
|
+
const { profileData, isLoadingProfileData, user } = useUserStore((state) => ({
|
|
31
27
|
profileData: state.profileData,
|
|
32
28
|
isLoadingProfileData: state.isLoadingProfileData,
|
|
33
29
|
user: state.user,
|
|
34
30
|
}));
|
|
35
|
-
const [fetchProfile, { data, error, refetch }] =
|
|
31
|
+
const [fetchProfile, { data, error, refetch }] = useLazyQuery(schema.FetchProfileDocument, {
|
|
36
32
|
variables: { userId },
|
|
37
33
|
context: {
|
|
38
|
-
uri:
|
|
34
|
+
uri: hosts.identityHost,
|
|
39
35
|
},
|
|
40
36
|
onCompleted: ({ fetchProfile }) => {
|
|
41
|
-
setProfile(new
|
|
37
|
+
setProfile(new ProfileEntity(fetchProfile));
|
|
42
38
|
setIsLoading(false);
|
|
43
39
|
},
|
|
44
40
|
onError: (err) => {
|
|
45
41
|
openAlert({
|
|
46
|
-
type:
|
|
42
|
+
type: alertVariants.error,
|
|
47
43
|
caption: err.message,
|
|
48
44
|
});
|
|
49
45
|
setProfile(null);
|
|
50
46
|
setIsLoading(false);
|
|
51
47
|
},
|
|
52
48
|
});
|
|
53
|
-
|
|
49
|
+
useEffect(() => {
|
|
54
50
|
if (!prefetchedProfile) {
|
|
55
51
|
if (userId === user?.userId) {
|
|
56
52
|
if (!isLoadingProfileData && !profileData) {
|
|
@@ -77,4 +73,4 @@ const useFetchProfile = ({ userId }, prefetchedProfile) => {
|
|
|
77
73
|
clientProfileError: error,
|
|
78
74
|
};
|
|
79
75
|
};
|
|
80
|
-
|
|
76
|
+
export { prefetchProfile, useFetchProfile };
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const api_1 = require("@ludo.ninja/api");
|
|
1
|
+
import { hosts, identitySchema as schema } from '@ludo.ninja/api';
|
|
4
2
|
const useFetchUserWallets = ({ userId }) => {
|
|
5
|
-
const { loading, error, data } =
|
|
3
|
+
const { loading, error, data } = schema.useFetchUserWalletsQuery({
|
|
6
4
|
variables: { userId },
|
|
7
5
|
context: {
|
|
8
|
-
uri:
|
|
6
|
+
uri: hosts.identityHost,
|
|
9
7
|
},
|
|
10
8
|
});
|
|
11
9
|
return {
|
|
@@ -16,4 +14,4 @@ const useFetchUserWallets = ({ userId }) => {
|
|
|
16
14
|
.sort((wallet, nextWallet) => Number(nextWallet?.mainWallet) - Number(wallet?.mainWallet)) || null,
|
|
17
15
|
};
|
|
18
16
|
};
|
|
19
|
-
|
|
17
|
+
export default useFetchUserWallets;
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
const api_1 = require("@ludo.ninja/api");
|
|
5
|
-
const DELETE_USERPIC_MUTATION = (0, client_1.gql) `
|
|
1
|
+
import { gql, useMutation } from '@apollo/client';
|
|
2
|
+
import { hosts, mediasSchema as schema } from '@ludo.ninja/api';
|
|
3
|
+
const DELETE_USERPIC_MUTATION = gql `
|
|
6
4
|
mutation DeleteUserpic {
|
|
7
5
|
deleteUserpic
|
|
8
6
|
}
|
|
9
7
|
`;
|
|
10
8
|
const useDeleteUserpic = () => {
|
|
11
|
-
const [deleteUserpic] =
|
|
9
|
+
const [deleteUserpic] = useMutation(DELETE_USERPIC_MUTATION, {
|
|
12
10
|
context: {
|
|
13
|
-
uri:
|
|
11
|
+
uri: hosts.mediasHost,
|
|
14
12
|
},
|
|
15
|
-
refetchQueries: [
|
|
13
|
+
refetchQueries: [schema.FetchUserpicDocument],
|
|
16
14
|
// onError: (err) => console.log(err),
|
|
17
15
|
});
|
|
18
16
|
return { deleteUserpic };
|
|
19
17
|
};
|
|
20
|
-
|
|
18
|
+
export default useDeleteUserpic;
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
const api_1 = require("@ludo.ninja/api");
|
|
5
|
-
const UPLOAD_USERPIC_MUTATION = (0, client_1.gql) `
|
|
1
|
+
import { gql, useMutation } from '@apollo/client';
|
|
2
|
+
import { hosts, mediasSchema as schema } from '@ludo.ninja/api';
|
|
3
|
+
const UPLOAD_USERPIC_MUTATION = gql `
|
|
6
4
|
mutation UploadUserpic($file: Upload!) {
|
|
7
5
|
uploadUserpic(file: $file)
|
|
8
6
|
}
|
|
9
7
|
`;
|
|
10
8
|
const useUploadUserpic = () => {
|
|
11
|
-
const [mutate] =
|
|
9
|
+
const [mutate] = useMutation(UPLOAD_USERPIC_MUTATION, {
|
|
12
10
|
context: {
|
|
13
|
-
uri:
|
|
11
|
+
uri: hosts.mediasHost,
|
|
14
12
|
},
|
|
15
|
-
refetchQueries: [
|
|
13
|
+
refetchQueries: [schema.FetchUserpicDocument],
|
|
16
14
|
// onError: (err) => {
|
|
17
15
|
// throw new Error(err as string)
|
|
18
16
|
// },
|
|
@@ -24,4 +22,4 @@ const useUploadUserpic = () => {
|
|
|
24
22
|
});
|
|
25
23
|
}
|
|
26
24
|
};
|
|
27
|
-
|
|
25
|
+
export default useUploadUserpic;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const api_1 = require("@ludo.ninja/api");
|
|
5
|
-
const env_1 = require("../../../../store/env");
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { hosts, mediasSchema as schema } from '@ludo.ninja/api';
|
|
3
|
+
import { useEnvStore } from "../../../../store/env";
|
|
6
4
|
const useFetchUserpic = () => {
|
|
7
|
-
const getMediaENVDomain =
|
|
8
|
-
const [userPic, setUserPic] =
|
|
9
|
-
const [fetchUserpic, { data, error, loading, refetch }] =
|
|
5
|
+
const getMediaENVDomain = useEnvStore((state) => state.getMediaDomain);
|
|
6
|
+
const [userPic, setUserPic] = useState(null);
|
|
7
|
+
const [fetchUserpic, { data, error, loading, refetch }] = schema.useFetchUserpicLazyQuery({
|
|
10
8
|
context: {
|
|
11
|
-
uri:
|
|
9
|
+
uri: hosts.mediasHost,
|
|
12
10
|
},
|
|
13
11
|
onCompleted: ({ fetchUserpic }) => {
|
|
14
12
|
if (fetchUserpic) {
|
|
@@ -36,4 +34,4 @@ const useFetchUserpic = () => {
|
|
|
36
34
|
userPic,
|
|
37
35
|
};
|
|
38
36
|
};
|
|
39
|
-
|
|
37
|
+
export default useFetchUserpic;
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const useDislikeOpportunity = () => {
|
|
8
|
-
const openAlert = (0, ui_1.useUiStore)((state) => state.openAlert);
|
|
9
|
-
const [mutate] = api_1.opportunitiesSchema.useDislikeOpportunityMutation({
|
|
1
|
+
import { hosts, opportunitiesSchema } from '@ludo.ninja/api';
|
|
2
|
+
import { alertVariants } from '@ludo.ninja/ui/build/system/Alert/type';
|
|
3
|
+
import { useUiStore } from "../../../store/ui";
|
|
4
|
+
export const useDislikeOpportunity = () => {
|
|
5
|
+
const openAlert = useUiStore((state) => state.openAlert);
|
|
6
|
+
const [mutate] = opportunitiesSchema.useDislikeOpportunityMutation({
|
|
10
7
|
context: {
|
|
11
|
-
uri:
|
|
8
|
+
uri: hosts.opportunitiesHost,
|
|
12
9
|
},
|
|
13
10
|
// onCompleted: () => {
|
|
14
11
|
// },
|
|
15
12
|
onError: (err) => {
|
|
16
13
|
openAlert({
|
|
17
|
-
type:
|
|
14
|
+
type: alertVariants.error,
|
|
18
15
|
caption: err.message,
|
|
19
16
|
});
|
|
20
17
|
},
|
|
@@ -26,4 +23,3 @@ const useDislikeOpportunity = () => {
|
|
|
26
23
|
}
|
|
27
24
|
return { dislikeOpportunityAction };
|
|
28
25
|
};
|
|
29
|
-
exports.useDislikeOpportunity = useDislikeOpportunity;
|