Korbs/Penpot-App
Archived
1
Fork 0

Fix issue with adding tab

This commit is contained in:
Korbs 2023-06-09 03:10:31 -04:00
parent 79e0d1b14f
commit 6c9b4e8141
No known key found for this signature in database

9
App.js
View file

@ -28,8 +28,11 @@ let InstanceURL = 'https://design.penpot.app/'
// App
export default function App() {
const [isModalVisible, setModalVisible] = useState(false)
const ToggleSettingModal = () => {setModalVisible(!isModalVisible)}
const [isModalVisible, setModalVisible] = useState(false);
const ToggleSettingModal = () => {
setModalVisible(!isModalVisible);
};
const [tabs, setTabs] = React.useState([
{
@ -39,7 +42,7 @@ export default function App() {
])
const addNewTab = () => {
setTabs(tabs => [
tabs,
...tabs,
{
name : "" + (parseInt(tabs.pop().name.replace("", "")) + 1),
component : TabScreen,