-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #916 from 3DStreet/zustand-cont
Zustand cont
- Loading branch information
Showing
19 changed files
with
400 additions
and
464 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,32 @@ | ||
import { Button } from '../Button'; | ||
import PropTypes from 'prop-types'; | ||
import styles from './Logo.module.scss'; | ||
|
||
import useStore from '@/store'; | ||
/** | ||
* Logo component. | ||
* | ||
* @author Oleksii Medvediev | ||
* @category Components | ||
*/ | ||
const Logo = ({ onToggleEdit, isEditor }) => ( | ||
<div className="flex items-center gap-2"> | ||
<div className={styles.logo} id="logoImg"> | ||
<img src="ui_assets/3D-St-stacked-128.png" alt="3DStreet Logo" /> | ||
</div> | ||
<Button onClick={onToggleEdit} className={styles.btn} variant="toolbtn"> | ||
{isEditor ? 'Enter Viewer mode' : 'Enter Editor mode'} | ||
</Button> | ||
</div> | ||
); | ||
const Logo = () => { | ||
const setIsInspectorEnabled = useStore( | ||
(state) => state.setIsInspectorEnabled | ||
); | ||
const isInspectorEnabled = useStore((state) => state.isInspectorEnabled); | ||
|
||
Logo.propTypes = { | ||
onToggleEdit: PropTypes.func, | ||
isEditor: PropTypes.bool | ||
return ( | ||
<div className="flex items-center space-x-2"> | ||
<div className={styles.logo} id="logoImg"> | ||
<img src="ui_assets/3D-St-stacked-128.png" alt="3DStreet Logo" /> | ||
</div> | ||
<Button | ||
onClick={() => setIsInspectorEnabled(!isInspectorEnabled)} | ||
className={styles.btn} | ||
variant="toolbtn" | ||
> | ||
{isInspectorEnabled ? 'Enter Viewer mode' : 'Enter Editor mode'} | ||
</Button> | ||
</div> | ||
); | ||
}; | ||
|
||
export { Logo }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 7 additions & 1 deletion
8
src/editor/components/modals/IntroModal/IntroModal.component.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.