Skip to content

Commit

Permalink
Remove unwanted CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-vara committed Aug 28, 2024
1 parent 36da719 commit 1ce16b5
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 78 deletions.
5 changes: 0 additions & 5 deletions src/coming-soon.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* Styles.
*/
import './styles/app.scss';

/**
* WordPress dependencies
*/
Expand Down
54 changes: 26 additions & 28 deletions src/components/Modal.jsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,27 @@
/**
* External dependencies
*/
import { useState } from 'react';
import { useState } from '@wordpress/element';

/**
* WordPress dependencies
*/
import { Modal as WP2Modal, Button, Icon } from '@wordpress/components';
import { Modal as WP2Modal, Button } from '@wordpress/components';
import { useDispatch, useSelect } from '@wordpress/data';
import { useEffect } from '@wordpress/element';
import { store as editPostStore } from '@wordpress/edit-post';
import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
import { launch } from './Icons';
import { store as nfdComingSoonStore } from '../store';
import { setComingSoon } from '../utils/api/comingSoon';


const Modal = () => {
const { setIsModalOpen } = useDispatch(nfdComingSoonStore);
const [isComingSoonActive, setIsComingSoonActive] = useState(true);
const [isComingSoonActive, setIsComingSoonActive] = useState(true);

const { isModalOpen } = useSelect(
(select) => ({
isModalOpen: select(nfdComingSoonStore).isModalOpen(),
})
);
const { isModalOpen } = useSelect((select) => ({
isModalOpen: select(nfdComingSoonStore).isModalOpen(),
}));

const handlePublishAndLaunch = () => {
setComingSoon(false);
Expand All @@ -40,27 +34,31 @@ const Modal = () => {
}

const title = __('Ready to launch your Site?', 'nfd-coming-soon');
const heading = __('Pages and posts you publish will not be visible to the public until you launch your site.', 'nfd-coming-soon');
const heading = __(
'Pages and posts you publish will not be visible to the public until you launch your site.',
'nfd-coming-soon'
);
const launchButtonText = __('Publish & Launch Site', 'nfd-coming-soon');
const withoutLaunchButtonText = __('Publish without launching', 'nfd-coming-soon');
const withoutLaunchButtonText = __(
'Publish Without Launching',
'nfd-coming-soon'
);

return (
<WP2Modal
title={title}
onRequestClose={() => setIsModalOpen(false)}
>
<WP2Modal title={title} onRequestClose={() => setIsModalOpen(false)}>
<div>
<p>{heading}</p>
<div className="modal-buttons">
<Button
icon={<Icon icon={launch} />}
variant="primary" onClick={handlePublishAndLaunch}>
{launchButtonText}
</Button>
<Button variant="secondary" onClick={() => setIsModalOpen(false)}>
{withoutLaunchButtonText}
</Button>
</div>
<br />
<Button variant="primary" onClick={handlePublishAndLaunch}>
{launchButtonText}
</Button>
&nbsp;
<Button
variant="secondary"
onClick={() => setIsModalOpen(false)}
>
{withoutLaunchButtonText}
</Button>
</div>
</WP2Modal>
);
Expand Down
15 changes: 0 additions & 15 deletions src/styles/_mixins.scss

This file was deleted.

4 changes: 0 additions & 4 deletions src/styles/app.scss

This file was deleted.

26 changes: 0 additions & 26 deletions src/styles/modal.scss

This file was deleted.

0 comments on commit 1ce16b5

Please sign in to comment.