Jim Su 38628c106f
Add formatting and linting for typescript components (#32)
* Add formatting and linting for typescript components

* Add lint GitHub Action

* Add push to GitHub action trigger

* Update GitHub action node version

* Add Husky

* Update husky settings

* Fix Husky settings

* Should not pass

* Test

* Test

* Finalize

* Add --legacy-peer-deps flag to npm ci

* Fix lint pre-commit hook

* Compile

* Remove eslint and prettier command quotes
2024-03-17 14:57:20 -04:00

42 lines
1.1 KiB
TypeScript

// App.tsx
import React, { useState } from "react";
import "./App.css";
import ChatInterface from "./components/ChatInterface";
import Terminal from "./components/Terminal";
import Planner from "./components/Planner";
function App(): JSX.Element {
const [activeTab, setActiveTab] = useState<"terminal" | "planner">(
"terminal",
);
return (
<div className="app">
<div className="left-pane">
<ChatInterface />
</div>
<div className="right-pane">
<div className="tab-container">
<div
className={`tab ${activeTab === "terminal" ? "active" : ""}`}
onClick={() => setActiveTab("terminal")}
>
Shell
</div>
<div
className={`tab ${activeTab === "planner" ? "active" : ""}`}
onClick={() => setActiveTab("planner")}
>
Planner
</div>
</div>
<div className="tab-content">
{activeTab === "terminal" ? <Terminal /> : <Planner />}
</div>
</div>
</div>
);
}
export default App;