20 lines
563 B
TypeScript
20 lines
563 B
TypeScript
import { Editor } from "./editor";
|
|
import { ChatSidebar } from "./chat-sidebar";
|
|
import { Title } from "@common/components/Title";
|
|
import { useAppState } from "../contexts/state";
|
|
import styles from '../assets/app.module.css';
|
|
|
|
export const App = () => {
|
|
const { currentStory } = useAppState();
|
|
|
|
return (
|
|
<div class={styles.root}>
|
|
{currentStory
|
|
? <Title>{currentStory.title} - Storywriter</Title>
|
|
: <Title>Storywriter</Title>}
|
|
<Editor />
|
|
<ChatSidebar />
|
|
</div>
|
|
);
|
|
};
|