Skip to content

Commit

Permalink
Tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
oakesjosh committed Mar 1, 2024
1 parent 323e93d commit 80cbb97
Showing 1 changed file with 72 additions and 68 deletions.
140 changes: 72 additions & 68 deletions src/dashboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { __, _n, sprintf } from '@wordpress/i18n';
import { store as noticesStore } from '@wordpress/notices';
import { useDispatch } from '@wordpress/data';
import { Button, Spinner } from '@wordpress/components';
import { MenuEditor } from '../blocks/navigation/components';

export default function KadenceBlocksHome() {
const [wizardState, setWizardState] = useState(false);
Expand Down Expand Up @@ -149,76 +150,79 @@ export default function KadenceBlocksHome() {
}
return (
<>
<LargeBanner
{...content?.largeBanner}
activateUrl={kadenceHomeParams.authUrl}
onUpdateWizard={() => setWizardState(true)}
isUserAuthenticated={authenticated}
showControls={showControls}
isNetworkAdmin={isNetworkAdmin}
/>
{aiStatus === 'getInitial' && (
<div className="components-notice kadence-ai-notice is-info">
<div className="components-notice__content">
<Spinner />
{__(
'Generating AI Content, this happens in the background, you can leave this page. You can find AI content in your design library in the editor.',
'kadence-blocks'
)}
</div>
</div>
)}
<Notices />
<div className="kb-container">
<div className="kb-section">
{content.actionCards.title}
{content.actionCards.cards.length > 0 && (
<div className="kb-auto-grid">
{content.actionCards.cards.map((card) => {
return <ActionCard key={card.heading} {...card} />;
})}
</div>
)}
</div>
<h1> Hello world</h1>
<MenuEditor />
<h1>Second Hello World</h1>
{/*<LargeBanner*/}
{/* {...content?.largeBanner}*/}
{/* activateUrl={kadenceHomeParams.authUrl}*/}
{/* onUpdateWizard={() => setWizardState(true)}*/}
{/* isUserAuthenticated={authenticated}*/}
{/* showControls={showControls}*/}
{/* isNetworkAdmin={isNetworkAdmin}*/}
{/*/>*/}
{/*{aiStatus === 'getInitial' && (*/}
{/* <div className="components-notice kadence-ai-notice is-info">*/}
{/* <div className="components-notice__content">*/}
{/* <Spinner />*/}
{/* {__(*/}
{/* 'Generating AI Content, this happens in the background, you can leave this page. You can find AI content in your design library in the editor.',*/}
{/* 'kadence-blocks'*/}
{/* )}*/}
{/* </div>*/}
{/* </div>*/}
{/*)}*/}
{/*<Notices />*/}
{/*<div className="kb-container">*/}
{/* <div className="kb-section">*/}
{/* {content.actionCards.title}*/}
{/* {content.actionCards.cards.length > 0 && (*/}
{/* <div className="kb-auto-grid">*/}
{/* {content.actionCards.cards.map((card) => {*/}
{/* return <ActionCard key={card.heading} {...card} />;*/}
{/* })}*/}
{/* </div>*/}
{/* )}*/}
{/* </div>*/}

{!hasPro &&
content.upsellContents.length > 0 &&
content.upsellContents.map((upsellContent) => {
return (
<div className="kb-section" key={upsellContent.heading}>
<UpsellContent {...upsellContent} />
</div>
);
})}
{/* {!hasPro &&*/}
{/* content.upsellContents.length > 0 &&*/}
{/* content.upsellContents.map((upsellContent) => {*/}
{/* return (*/}
{/* <div className="kb-section" key={upsellContent.heading}>*/}
{/* <UpsellContent {...upsellContent} />*/}
{/* </div>*/}
{/* );*/}
{/* })}*/}

{!isNetworkAdmin && wizardState && (
<AiWizard
onClose={closeAiWizard}
onPrimaryAction={handleAiWizardPrimaryAction}
photographyOnly={false}
credits={false}
isFullScreen={true}
/>
)}
</div>
<div className="kb-section kb-section--dark">
<div className="kb-container">
<SectionTitle title={content.knowledgeBase.heading} variant="white" />
<ArticleSlider articles={content.knowledgeBase.articles} />
</div>
</div>
<div className="kb-footer-status">
{showControls && (
<p>{authenticated ? footerText : __('AI access is not authorized.', 'kadence-blocks')}</p>
)}
{!showControls && (
<p>
{authenticated
? __('AI access authorized.', 'kadence-blocks')
: __('AI access is not authorized.', 'kadence-blocks')}
</p>
)}
</div>
{/* {!isNetworkAdmin && wizardState && (*/}
{/* <AiWizard*/}
{/* onClose={closeAiWizard}*/}
{/* onPrimaryAction={handleAiWizardPrimaryAction}*/}
{/* photographyOnly={false}*/}
{/* credits={false}*/}
{/* isFullScreen={true}*/}
{/* />*/}
{/* )}*/}
{/*</div>*/}
{/*<div className="kb-section kb-section--dark">*/}
{/* <div className="kb-container">*/}
{/* <SectionTitle title={content.knowledgeBase.heading} variant="white" />*/}
{/* <ArticleSlider articles={content.knowledgeBase.articles} />*/}
{/* </div>*/}
{/*</div>*/}
{/*<div className="kb-footer-status">*/}
{/* {showControls && (*/}
{/* <p>{authenticated ? footerText : __('AI access is not authorized.', 'kadence-blocks')}</p>*/}
{/* )}*/}
{/* {!showControls && (*/}
{/* <p>*/}
{/* {authenticated*/}
{/* ? __('AI access authorized.', 'kadence-blocks')*/}
{/* : __('AI access is not authorized.', 'kadence-blocks')}*/}
{/* </p>*/}
{/* )}*/}
{/*</div>*/}
</>
);
}

0 comments on commit 80cbb97

Please sign in to comment.