This commit is contained in:
@ -1,13 +1,25 @@
|
||||
import { Container, Typography, Box, Button } from '@mui/material';
|
||||
import { Add } from '@mui/icons-material';
|
||||
import {
|
||||
Container,
|
||||
Typography,
|
||||
Box,
|
||||
Button,
|
||||
IconButton,
|
||||
Tooltip,
|
||||
} from '@mui/material';
|
||||
import { Add, Logout } from '@mui/icons-material';
|
||||
import { IdeasTable } from './components/IdeasTable';
|
||||
import { IdeasFilters } from './components/IdeasFilters';
|
||||
import { CreateIdeaModal } from './components/CreateIdeaModal';
|
||||
import { useIdeasStore } from './store/ideas';
|
||||
import keycloak from './services/keycloak';
|
||||
|
||||
function App() {
|
||||
const { setCreateModalOpen } = useIdeasStore();
|
||||
|
||||
const handleLogout = () => {
|
||||
void keycloak.logout();
|
||||
};
|
||||
|
||||
return (
|
||||
<Container maxWidth="xl" sx={{ py: 4 }}>
|
||||
<Box
|
||||
@ -26,13 +38,20 @@ function App() {
|
||||
Управление бэклогом идей команды
|
||||
</Typography>
|
||||
</Box>
|
||||
<Button
|
||||
variant="contained"
|
||||
startIcon={<Add />}
|
||||
onClick={() => setCreateModalOpen(true)}
|
||||
>
|
||||
Новая идея
|
||||
</Button>
|
||||
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
|
||||
<Button
|
||||
variant="contained"
|
||||
startIcon={<Add />}
|
||||
onClick={() => setCreateModalOpen(true)}
|
||||
>
|
||||
Новая идея
|
||||
</Button>
|
||||
<Tooltip title="Выйти">
|
||||
<IconButton onClick={handleLogout} color="default">
|
||||
<Logout />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<Box sx={{ mb: 3 }}>
|
||||
|
||||
Reference in New Issue
Block a user