40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
import { Box, Button, Container, Paper, TextField, Typography } from '@mui/material'
|
|
import { useState } from 'react'
|
|
|
|
export default function RegisterCharacter() {
|
|
const [name, setName] = useState('')
|
|
const [server, setServer] = useState('')
|
|
|
|
const handleSubmit = () => {
|
|
console.log('캐릭터 등록:', { name, server })
|
|
// 추후 API 연동 예정
|
|
}
|
|
|
|
return (
|
|
<Container maxWidth="sm">
|
|
<Paper sx={{ p: 4, mt: 8 }}>
|
|
<Typography variant="h5" gutterBottom>
|
|
캐릭터 등록
|
|
</Typography>
|
|
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 2 }}>
|
|
<TextField
|
|
label="캐릭터명"
|
|
value={name}
|
|
onChange={(e) => setName(e.target.value)}
|
|
fullWidth
|
|
/>
|
|
<TextField
|
|
label="서버"
|
|
value={server}
|
|
onChange={(e) => setServer(e.target.value)}
|
|
fullWidth
|
|
/>
|
|
<Button variant="contained" onClick={handleSubmit}>
|
|
등록
|
|
</Button>
|
|
</Box>
|
|
</Paper>
|
|
</Container>
|
|
)
|
|
}
|