From 6a370ce0f170df46240c2f35a836d824fab10831 Mon Sep 17 00:00:00 2001 From: MiroslavDionisiev Date: Wed, 23 Oct 2024 12:45:23 +0300 Subject: [PATCH] chore: removed user guiding calls --- src/views/preview/presentation.jsx | 14 ++------------ src/views/preview/project-view.jsx | 4 ---- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/src/views/preview/presentation.jsx b/src/views/preview/presentation.jsx index eeac5c040..7eb4c2298 100644 --- a/src/views/preview/presentation.jsx +++ b/src/views/preview/presentation.jsx @@ -34,14 +34,13 @@ const thumbnailUrl = require('../../lib/user-thumbnail'); const FormsyProjectUpdater = require('./formsy-project-updater.jsx'); const EmailConfirmationModal = require('../../components/modal/email-confirmation/modal.jsx'); const EmailConfirmationBanner = require('../../components/dropdown-banner/email-confirmation/banner.jsx'); -const {onCommented} = require('../../lib/user-guiding.js'); const queryString = require('query-string').default; const projectShape = require('./projectshape.jsx').projectShape; require('./preview.scss'); const frameless = require('../../lib/frameless'); -const {useState, useCallback, useEffect} = require('react'); +const {useState, useEffect} = require('react'); const ProjectJourney = require('../../components/journeys/project-journey/project-journey.jsx'); const {triggerAnalyticsEvent, onboardingEligibilityCheck} = require('../../lib/onboarding.js'); @@ -150,7 +149,6 @@ const PreviewPresentation = ({ userOwnsProject, visibilityInfo }) => { - const [hasSubmittedComment, setHasSubmittedComment] = useState(false); const [canViewProjectJourney, setCanViewProjectJourney] = useState(false); const [shouldStopProject, setShouldStopProject] = useState(false); useEffect(() => { @@ -232,14 +230,6 @@ const PreviewPresentation = ({ ))} ); - - const onAddCommentWrapper = useCallback(body => { - onAddComment(body); - if (!hasSubmittedComment && user) { - setHasSubmittedComment(true); - onCommented(user.id, permissions); - } - }, [hasSubmittedComment, user]); useEffect(() => { if (canViewProjectJourney && projectInfo.title) { @@ -654,7 +644,7 @@ const PreviewPresentation = ({ isLoggedIn ? ( isShared && ) : ( /* TODO add box for signing in to leave a comment */ diff --git a/src/views/preview/project-view.jsx b/src/views/preview/project-view.jsx index d9b8f544a..02de9af2e 100644 --- a/src/views/preview/project-view.jsx +++ b/src/views/preview/project-view.jsx @@ -25,9 +25,6 @@ const ConnectedLogin = require('../../components/login/connected-login.jsx'); const CanceledDeletionModal = require('../../components/login/canceled-deletion-modal.jsx'); const NotAvailable = require('../../components/not-available/not-available.jsx'); const Meta = require('./meta.jsx'); -const { - onProjectShared -} = require('../../lib/user-guiding.js'); const sessionActions = require('../../redux/session.js'); const {selectProjectCommentsGloballyEnabled, selectIsTotallyNormal} = require('../../redux/session'); @@ -702,7 +699,6 @@ class Preview extends React.Component { justRemixed: false, justShared: true }); - onProjectShared(this.props.user.id, this.props.permissions); } handleShareAttempt () { this.setState({