TAO/client/src/App.tsx

29 lines
653 B
TypeScript
Raw Normal View History

2023-09-02 04:53:15 +00:00
import React from 'react';
import './App.css';
2023-09-02 07:24:30 +00:00
import Home from './components/Home';
2023-09-14 15:03:19 +00:00
import Settings from './components/Settings';
import SwipeableViews from 'react-swipeable-views';
2023-09-02 04:53:15 +00:00
function App() {
2023-09-14 15:03:19 +00:00
const [index, setIndex] = React.useState(1);
const handleChangeIndex = (index: number) => {
console.log("Changed index to:", index); // Add a log to see if this function is called
setIndex(index);
};
2023-09-02 04:53:15 +00:00
return (
2023-09-14 15:03:19 +00:00
<SwipeableViews index={index} onChangeIndex={handleChangeIndex}>
<div>
<Settings />
</div>
<div>
<Home />
</div>
</SwipeableViews>
2023-09-02 04:53:15 +00:00
);
}
export default App;
2023-09-14 15:03:19 +00:00