2022-08-10 09:42:15 -05:00
|
|
|
import React, { useState } from 'react'
|
2022-08-09 21:57:29 -05:00
|
|
|
import Typography from '@mui/material/Typography'
|
2022-08-10 09:42:15 -05:00
|
|
|
import TextField from '@mui/material/TextField'
|
|
|
|
import { v4 as uuid } from 'uuid'
|
2022-08-09 21:28:46 -05:00
|
|
|
|
|
|
|
export function Home() {
|
2022-08-10 09:42:15 -05:00
|
|
|
const [roomName, setRoomName] = useState(uuid())
|
|
|
|
|
|
|
|
const handleRoomNameChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
|
|
|
const { value } = event.target
|
|
|
|
setRoomName(value)
|
|
|
|
}
|
|
|
|
|
2022-08-09 21:57:29 -05:00
|
|
|
return (
|
|
|
|
<div className="Home">
|
|
|
|
<header className="max-w-3xl text-center mx-auto">
|
|
|
|
<Typography variant="h1">chitchatter</Typography>
|
|
|
|
<Typography variant="body1">
|
|
|
|
This is a communication tool that is free, open source, and designed
|
|
|
|
for maximum security. All communication between you and your online
|
|
|
|
peers is encrypted and ephemeral.
|
|
|
|
</Typography>
|
2022-08-09 22:14:59 -05:00
|
|
|
<Typography variant="body1">
|
|
|
|
chitchatter is still a work in progress and not yet ready to be used!
|
|
|
|
</Typography>
|
2022-08-09 21:57:29 -05:00
|
|
|
</header>
|
2022-08-10 09:42:15 -05:00
|
|
|
<main className="mt-8 max-w-3xl text-center mx-auto">
|
|
|
|
<TextField
|
|
|
|
id="outlined-basic"
|
|
|
|
label="Room name"
|
|
|
|
variant="outlined"
|
|
|
|
value={roomName}
|
|
|
|
onChange={handleRoomNameChange}
|
|
|
|
/>
|
|
|
|
</main>
|
2022-08-09 21:57:29 -05:00
|
|
|
</div>
|
|
|
|
)
|
2022-08-09 21:28:46 -05:00
|
|
|
}
|