diff --git a/src/pages/dashboard/governance/details.tsx b/src/pages/dashboard/governance/details.tsx index 09899db9..2e62a31c 100644 --- a/src/pages/dashboard/governance/details.tsx +++ b/src/pages/dashboard/governance/details.tsx @@ -16,7 +16,7 @@ export default function ProductDetailsPage() { description="Discover the latest decentralized creations on Watchit. Powered by Web3 & AI." url={`${GLOBAL_CONSTANTS.BASE_URL}/governance`} > - + ) } diff --git a/src/pages/dashboard/publication/details.tsx b/src/pages/dashboard/publication/details.tsx index deafbc92..bd5f710e 100644 --- a/src/pages/dashboard/publication/details.tsx +++ b/src/pages/dashboard/publication/details.tsx @@ -1,4 +1,3 @@ -import { Helmet } from 'react-helmet-async'; // routes import { useParams, useRouter } from '@src/routes/hooks'; // sections @@ -7,6 +6,8 @@ import Header from '@src/layouts/dashboard/header.tsx'; import { paths } from '@src/routes/paths.ts'; import HeaderContent from '@src/layouts/dashboard/header-content.tsx'; +import { GLOBAL_CONSTANTS } from '@src/config-global.ts'; +import { OgMetaTags } from '@src/components/og-meta-tags.tsx'; // ---------------------------------------------------------------------- @@ -20,16 +21,16 @@ export default function ProductDetailsPage() { }; return ( - <> - - Dashboard: Movie details - - +
- +
); } diff --git a/src/pages/dashboard/publication/new.tsx b/src/pages/dashboard/publication/new.tsx index fa8adb18..dbc671da 100644 --- a/src/pages/dashboard/publication/new.tsx +++ b/src/pages/dashboard/publication/new.tsx @@ -1,17 +1,18 @@ -import { Helmet } from 'react-helmet-async'; // sections import { PublicationCreateView } from '@src/sections/publication/view'; +import { GLOBAL_CONSTANTS } from '@src/config-global.ts'; +import { OgMetaTags } from '@src/components/og-meta-tags.tsx'; // ---------------------------------------------------------------------- export default function MovieCreatePage() { return ( - <> - - Dashboard: Create a new movie - - + - + ); } diff --git a/src/pages/dashboard/publication/play.tsx b/src/pages/dashboard/publication/play.tsx index 0865efd4..d2122c28 100644 --- a/src/pages/dashboard/publication/play.tsx +++ b/src/pages/dashboard/publication/play.tsx @@ -1,6 +1,7 @@ -import { Helmet } from 'react-helmet-async'; // sections import { PublicationPlayView } from '@src/sections/publication/view'; +import { GLOBAL_CONSTANTS } from '@src/config-global.ts'; +import { OgMetaTags } from '@src/components/og-meta-tags.tsx'; import { useParams } from '@src/routes/hooks'; // ---------------------------------------------------------------------- @@ -10,12 +11,12 @@ export default function MovieCreatePage() { const { id } = params; return ( - <> - - Dashboard: Create a new movie - - - - + + + ); } diff --git a/src/pages/dashboard/user/profile.tsx b/src/pages/dashboard/user/profile.tsx index 71034090..3bcb6996 100644 --- a/src/pages/dashboard/user/profile.tsx +++ b/src/pages/dashboard/user/profile.tsx @@ -3,6 +3,8 @@ import { UserProfileView } from '@src/sections/user/view'; import { useParams } from '@src/routes/hooks'; import Header from '@src/layouts/dashboard/header.tsx'; import HeaderContent from '@src/layouts/dashboard/header-content.tsx'; +import { GLOBAL_CONSTANTS } from '@src/config-global.ts'; +import { OgMetaTags } from '@src/components/og-meta-tags.tsx'; // ---------------------------------------------------------------------- @@ -11,12 +13,16 @@ export default function UserProfilePage() { const { id } = params; return ( - <> +
- +
); } diff --git a/src/sections/publication/view/publication-details-view.tsx b/src/sections/publication/view/publication-details-view.tsx index fbd767c6..b9c90a50 100644 --- a/src/sections/publication/view/publication-details-view.tsx +++ b/src/sections/publication/view/publication-details-view.tsx @@ -1,5 +1,5 @@ // REACT IMPORTS -import { FC, PropsWithChildren, useEffect, useRef, useState } from 'react'; +import { useEffect, useRef, useState } from 'react'; // MUI IMPORTS import Box from '@mui/material/Box'; @@ -32,11 +32,7 @@ import { SubscribeProfileModal } from '@src/components/subscribe-profile-modal.t import LoadingButton from '@mui/lab/LoadingButton'; import { useDispatch, useSelector } from 'react-redux'; import { openLoginModal } from '@redux/auth'; -// @ts-ignore -import { ReadResult } from '@lens-protocol/react/dist/declarations/src/helpers/reads'; import { appId, PublicationType, usePublications } from '@lens-protocol/react-web'; -import { OgMetaTags } from '@src/components/og-meta-tags.tsx'; -import { GLOBAL_CONSTANTS } from '@src/config-global.ts'; const MAX_LINES = 5; @@ -120,36 +116,32 @@ export default function PublicationDetailsView({ id }: Props) { const filteredPublications = publications?.filter((publication) => publication.id !== id) ?? []; if (loading || accessLoading) return ( - - - + ); if (data.isHidden) return ( - - - - Publication is hidden - - - + + + Publication is hidden + + ); return ( - + <> - + ); } - -interface PublicationDetailsTagsProps { - title: string - image: string - publicationId: string -} - -const PublicationDetailsTags: FC> = ({ title, publicationId, image: customImage, children }) => { - // OG META TAGS DATA - const metaTitle = `Watchit: ${title}` - const description = 'Check out this amazing publication on Watchit, where content meets Web3 & AI.' - const image = customImage ?? GLOBAL_CONSTANTS.LOGO_URL - const url = `${GLOBAL_CONSTANTS.BASE_URL}/publication/${publicationId}` - - return - {children} - -} diff --git a/src/sections/user/view/user-profile-view.tsx b/src/sections/user/view/user-profile-view.tsx index 3fc27815..53467789 100644 --- a/src/sections/user/view/user-profile-view.tsx +++ b/src/sections/user/view/user-profile-view.tsx @@ -1,4 +1,4 @@ -import { FC, PropsWithChildren, useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; // @mui import Tab from '@mui/material/Tab'; import Container from '@mui/material/Container'; @@ -22,8 +22,6 @@ import { RootState } from '@src/redux/store'; import { setFollowers, setFollowings } from '@redux/followers'; import ProfileReferrals from "@src/sections/user/profile-referrals.tsx"; import useReferrals from "@src/hooks/use-referrals.ts"; -import { OgMetaTags } from '@src/components/og-meta-tags.tsx'; -import { GLOBAL_CONSTANTS } from '@src/config-global.ts'; // ---------------------------------------------------------------------- @@ -114,13 +112,11 @@ const UserProfileView = ({ id }: any) => { })); if (loadingProfile || loadingPublications) return ( - - - + ); return ( - + <> { {currentTab === 'following' && profile && } {currentTab === 'referrals' && sessionData?.profile?.id === id && } - + ); }; @@ -170,24 +166,4 @@ const TabLabel = ({ label, count }: any) => ( ); -interface ProfileTagsProps { - profile: any -} - -const ProfileTags: FC> = ({ profile, children }) => { - // OG META TAGS DATA - const title = `Watchit: Profile of "${profile?.metadata?.displayName}"` - const description = 'Discover this user’s profile on Watchit, a decentralized platform powered by Web3 & AI.' - const url = `${GLOBAL_CONSTANTS.BASE_URL}/profile/${profile?.id}` - - return - {children} - -} - - export default UserProfileView;