Fix issue with adding tab
This commit is contained in:
parent
79e0d1b14f
commit
6c9b4e8141
1 changed files with 6 additions and 3 deletions
9
App.js
9
App.js
|
@ -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,
|
||||
|
|
Reference in a new issue