diff --git a/src/Components/Navbar/NavDesktop.tsx b/src/Components/Navbar/NavDesktop.tsx index 2b2d625..5bbc318 100644 --- a/src/Components/Navbar/NavDesktop.tsx +++ b/src/Components/Navbar/NavDesktop.tsx @@ -166,6 +166,8 @@ export default function NavDesktop() { {curUser !== undefined && (curUser ? }> }> import("src/features/Posts/Components/Comments")) interface Props { question: Question diff --git a/src/features/Posts/pages/PostDetailsPage/PostDetailsPage.tsx b/src/features/Posts/pages/PostDetailsPage/PostDetailsPage.tsx index 06c9417..a8875ee 100644 --- a/src/features/Posts/pages/PostDetailsPage/PostDetailsPage.tsx +++ b/src/features/Posts/pages/PostDetailsPage/PostDetailsPage.tsx @@ -4,15 +4,17 @@ import { useParams } from 'react-router-dom' import NotFoundPage from 'src/features/Shared/pages/NotFoundPage/NotFoundPage' import { Post_Type, usePostDetailsQuery } from 'src/graphql' import { capitalize } from 'src/utils/helperFunctions' -import { CommentsSection } from '../../Components/Comments' import ScrollToTop from 'src/utils/routing/scrollToTop' -import TrendingCard from '../../Components/TrendingCard/TrendingCard' +import TrendingCard from 'src/features/Posts/Components/TrendingCard/TrendingCard' import AuthorCard from './Components/AuthorCard/AuthorCard' import PageContent from './Components/PageContent/PageContent' import PostActions from './Components/PostActions/PostActions' import PostDetailsPageSkeleton from './PostDetailsPage.skeleton' import styles from './styles.module.scss' +import { lazy, Suspense } from 'react' +import { RotatingLines } from 'react-loader-spinner' +const CommentsSection = lazy(() => import("src/features/Posts/Components/Comments")) export default function PostDetailsPage() { const { type: _type, id } = useParams(); @@ -60,8 +62,11 @@ export default function PostDetailsPage() {
- - +
+ }> + +
diff --git a/src/features/Profiles/pages/EditProfilePage/UpdateMyProfileTab/UpdateMyProfileTab.tsx b/src/features/Profiles/pages/EditProfilePage/UpdateMyProfileTab/UpdateMyProfileTab.tsx index 42fda77..9f354a6 100644 --- a/src/features/Profiles/pages/EditProfilePage/UpdateMyProfileTab/UpdateMyProfileTab.tsx +++ b/src/features/Profiles/pages/EditProfilePage/UpdateMyProfileTab/UpdateMyProfileTab.tsx @@ -111,7 +111,7 @@ export default function UpdateMyProfileTab({ data, onClose }: Props) { return (
- +
diff --git a/src/utils/helperFunctions.tsx b/src/utils/helperFunctions.tsx index 1703ba0..f842ac8 100644 --- a/src/utils/helperFunctions.tsx +++ b/src/utils/helperFunctions.tsx @@ -62,8 +62,6 @@ export function lazyModal> } export function trimText(text: string | undefined | null, length: number) { - console.log(text); - if (!text) return ''; return text.slice(0, length) + (text.length > length ? "..." : "") }