chore: removed user guiding calls

This commit is contained in:
MiroslavDionisiev 2024-10-23 12:45:23 +03:00
parent ff9a54bfdd
commit 6a370ce0f1
2 changed files with 2 additions and 16 deletions

View file

@ -34,14 +34,13 @@ const thumbnailUrl = require('../../lib/user-thumbnail');
const FormsyProjectUpdater = require('./formsy-project-updater.jsx'); const FormsyProjectUpdater = require('./formsy-project-updater.jsx');
const EmailConfirmationModal = require('../../components/modal/email-confirmation/modal.jsx'); const EmailConfirmationModal = require('../../components/modal/email-confirmation/modal.jsx');
const EmailConfirmationBanner = require('../../components/dropdown-banner/email-confirmation/banner.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 queryString = require('query-string').default;
const projectShape = require('./projectshape.jsx').projectShape; const projectShape = require('./projectshape.jsx').projectShape;
require('./preview.scss'); require('./preview.scss');
const frameless = require('../../lib/frameless'); 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 ProjectJourney = require('../../components/journeys/project-journey/project-journey.jsx');
const {triggerAnalyticsEvent, onboardingEligibilityCheck} = require('../../lib/onboarding.js'); const {triggerAnalyticsEvent, onboardingEligibilityCheck} = require('../../lib/onboarding.js');
@ -150,7 +149,6 @@ const PreviewPresentation = ({
userOwnsProject, userOwnsProject,
visibilityInfo visibilityInfo
}) => { }) => {
const [hasSubmittedComment, setHasSubmittedComment] = useState(false);
const [canViewProjectJourney, setCanViewProjectJourney] = useState(false); const [canViewProjectJourney, setCanViewProjectJourney] = useState(false);
const [shouldStopProject, setShouldStopProject] = useState(false); const [shouldStopProject, setShouldStopProject] = useState(false);
useEffect(() => { useEffect(() => {
@ -233,14 +231,6 @@ const PreviewPresentation = ({
</FlexRow> </FlexRow>
); );
const onAddCommentWrapper = useCallback(body => {
onAddComment(body);
if (!hasSubmittedComment && user) {
setHasSubmittedComment(true);
onCommented(user.id, permissions);
}
}, [hasSubmittedComment, user]);
useEffect(() => { useEffect(() => {
if (canViewProjectJourney && projectInfo.title) { if (canViewProjectJourney && projectInfo.title) {
triggerAnalyticsEvent({ triggerAnalyticsEvent({
@ -654,7 +644,7 @@ const PreviewPresentation = ({
isLoggedIn ? ( isLoggedIn ? (
isShared && <ComposeComment isShared && <ComposeComment
postURI={`/proxy/comments/project/${projectId}`} postURI={`/proxy/comments/project/${projectId}`}
onAddComment={onAddCommentWrapper} onAddComment={onAddComment}
/> />
) : ( ) : (
/* TODO add box for signing in to leave a comment */ /* TODO add box for signing in to leave a comment */

View file

@ -25,9 +25,6 @@ const ConnectedLogin = require('../../components/login/connected-login.jsx');
const CanceledDeletionModal = require('../../components/login/canceled-deletion-modal.jsx'); const CanceledDeletionModal = require('../../components/login/canceled-deletion-modal.jsx');
const NotAvailable = require('../../components/not-available/not-available.jsx'); const NotAvailable = require('../../components/not-available/not-available.jsx');
const Meta = require('./meta.jsx'); const Meta = require('./meta.jsx');
const {
onProjectShared
} = require('../../lib/user-guiding.js');
const sessionActions = require('../../redux/session.js'); const sessionActions = require('../../redux/session.js');
const {selectProjectCommentsGloballyEnabled, selectIsTotallyNormal} = require('../../redux/session'); const {selectProjectCommentsGloballyEnabled, selectIsTotallyNormal} = require('../../redux/session');
@ -702,7 +699,6 @@ class Preview extends React.Component {
justRemixed: false, justRemixed: false,
justShared: true justShared: true
}); });
onProjectShared(this.props.user.id, this.props.permissions);
} }
handleShareAttempt () { handleShareAttempt () {
this.setState({ this.setState({