Skip to content
This repository has been archived by the owner on Jan 30, 2025. It is now read-only.

bookings ctb added in pages and posts #1118

Merged
merged 2 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
32 changes: 24 additions & 8 deletions src/app/pages/pages-and-posts/bookingAndAppointments.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,30 @@ const BookingAndAppointments = () => {
) }
</p>
</Card.Content>
<div className="nfd-flex nfd-justify-end nfd-gap-6 nfd-items-center">
<a href="edit.php?post_type=yith_booking&yith-plugin-fw-panel-skip-redirect=1">
{ __( 'View all', 'wp-plugin-bluehost' ) }
</a>
<a href="edit.php?post_type=yith_booking&yith-plugin-fw-panel-skip-redirect=1">
<Button>{ __( 'Add New', 'wp-plugin-bluehost' ) }</Button>
</a>
</div>
{ window.NewfoldRuntime.isYithBookingActive &&
window.NewfoldRuntime.isWoocommerceActive ? (
<>
<a href="edit.php?post_type=yith_booking&yith-plugin-fw-panel-skip-redirect=1">
{ __( 'View all', 'wp-plugin-bluehost' ) }
</a>
<a href="edit.php?post_type=yith_booking&yith-plugin-fw-panel-skip-redirect=1">
<Button>
{ __( 'Add New', 'wp-plugin-bluehost' ) }
</Button>
</a>
</>
) : (
<Button
as="a"
type="button"
data-ctb-id={ 'e2f4caa1-411c-468b-86b1-a3c4e4e8cec6' }
data-action="load-nfd-ctb"
target="_blank"
variant="upsell"
>
{ __( 'Buy Now', 'wp-plugin-bluehost' ) }
</Button>
) }
</Card>
);
};
Expand Down
5 changes: 1 addition & 4 deletions src/app/pages/pages-and-posts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,7 @@ const PagesAndPosts = () => {
{ window.NewfoldRuntime.isWoocommerceActive && (
<ProductsPages />
) }
{ window.NewfoldRuntime.isYithBookingActive &&
window.NewfoldRuntime.isWoocommerceActive && (
<BookingAndAppointments />
) }
<BookingAndAppointments />
</div>
</Container>
</Page>
Expand Down
7 changes: 5 additions & 2 deletions src/app/pages/settings/socialMediaAccounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ const SocialMediaAccounts = () => {
const getFbDetails = () => {
getFacebookUserProfileDetails().then( ( res ) => {
setFbLogin( res === 'token not found!' ? false : true );
if ( Array.isArray( res ) ) setLoginInfo( res[ 0 ] );
else setLoginInfo( res );
if ( Array.isArray( res ) ) {
setLoginInfo( res[ 0 ] );
} else {
setLoginInfo( res );
}
} );
};

Expand Down
Loading