Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed url to wpsiteurl in mini-preview instead of dummy domain #538

Merged
merged 3 commits into from
May 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions src/OnboardingSPA/components/MiniPreview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { memo, useState, useEffect } from '@wordpress/element';
import { useSelect } from '@wordpress/data';

import { store as nfdOnboardingStore } from '../../store';
import { wpSiteUrl } from '../../../constants';

import getContents from './contents';

Expand All @@ -23,7 +24,6 @@ const MiniPreview = ( {
const content = getContents( brandUrl );
const titlePreview = title === '' ? content.defaultTitle : title;
const descPreview = desc === '' ? content.defaultDesc : desc;
const urlPreview = title === '' ? content.defaultUrl : titleToUrl();
arunshenoy99 marked this conversation as resolved.
Show resolved Hide resolved

const [ facebook, setFacebook ] = useState( '' );
const [ twitter, setTwitter ] = useState( '' );
Expand Down Expand Up @@ -78,13 +78,6 @@ const MiniPreview = ( {
{ url: tiktok, image: 'var(--tiktok-icon)' },
];

function titleToUrl() {
return `https://${ title
?.toLowerCase()
.replace( /\s/g, '' )
.replace( /\W/g, '' ) }.com`;
}

function socialIconList() {
return socialDataset.map( ( socialInfo, idx ) => {
return (
Expand Down Expand Up @@ -180,7 +173,7 @@ const MiniPreview = ( {
className="browser-row-search__search-box_input"
type="text"
onChange={ () => {} }
value={ urlPreview }
value={ wpSiteUrl }
></input>
</div>
<div className="browser-row-search__more">
Expand All @@ -196,7 +189,7 @@ const MiniPreview = ( {
{ titlePreview }
</h4>
<span className="browser-content_top-row-link">
{ urlPreview }
{ wpSiteUrl }
</span>
</div>
<h5 className="browser-content_desc">{ descPreview }</h5>
Expand Down
Loading