Skip to content

Commit

Permalink
Merge branch 'PRESS4-455' into PRESS4-273-FIXES
Browse files Browse the repository at this point in the history
  • Loading branch information
ramyakrishnai committed Jan 30, 2024
2 parents 03ef47c + d0c5953 commit 5c85b0a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/components/OnboardingScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import classNames from "classnames";
import { ReactComponent as ComingSoonIllustration } from "../icons/coming-soon.svg";
import { ReactComponent as WelcomeIllustration } from "../icons/store-live.svg";
import { NewfoldRuntime } from "../sdk/NewfoldRuntime";
import { RuntimeSdk } from "../sdk/runtime";
import { OnboardingList } from "./OnboardingList";
import { Section } from "./Section";
import { SiteStatus } from "./SiteStatus";
Expand Down Expand Up @@ -134,13 +135,13 @@ export function OnboardingScreen({
)}
<div
className={classNames(
"nfd-absolute nfd-top-0 nfd-left-0 nfd-bottom-0 nfd-right-0 nfd-place-content-center nfd-grid",
"nfd-absolute nfd-top-0 nfd-left-0 nfd-bottom-0 nfd-right-0 nfd-flex nfd-items-center nfd-justify-center nfd-gap-4 nfd-flex-col ",
"hover:nfd-animate-[wiggle_1s_ease-in-out_infinite]"
)}
>
<Button
style={{
display: hovered ? "block" : "none",
display: hovered ? "inline-block" : "none",
}}
as="a"
className="nfd-bg-canvas "
Expand All @@ -150,6 +151,18 @@ export function OnboardingScreen({
>
{__("View your site", "wp-module-ecommerce")}
</Button>
<Button
style={{
display: hovered ? "inline-block" : "none",
}}
as="a"
className="nfd-bg-canvas "
href={RuntimeSdk.adminUrl('site-editor.php?postType=wp_template&postId='+NewfoldRuntime.currentTheme+'//home')}
target="_blank"
variant="secondary"
>
{__("Edit your site", "wp-module-ecommerce")}
</Button>
</div>
</div>
</div>
Expand Down
3 changes: 3 additions & 0 deletions src/sdk/NewfoldRuntime.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@ export const NewfoldRuntime = {
},
get homeUrl(){
return window.NewfoldRuntime?.homeUrl
},
get currentTheme(){
return (window.NewfoldRuntime?.currentTheme).toLowerCase().replace(/[\s-]+/g, '');
}
};

0 comments on commit 5c85b0a

Please sign in to comment.