fix: испралена ошибка с перезагрузкой при создании доски, небольшое исправление стилей

This commit is contained in:
Vladiysss
2026-02-20 23:52:42 +03:00
parent 616d5678c6
commit c4d00ac346
4 changed files with 66 additions and 41 deletions

View File

@@ -113,7 +113,8 @@ const KBBoardsList = () => {
setTimer(100); setTimer(100);
}; };
const createBoard = async () => { const createBoard = async (e) => {
e.preventDefault();
try { try {
setLoading(true) setLoading(true)
const newBoard = { title, description }; const newBoard = { title, description };

View File

@@ -1,3 +1,9 @@
html, body {
height: 100%;
margin: 0;
padding: 0;
}
.App { .App {
text-align: center; text-align: center;
} }
@@ -81,6 +87,13 @@ ul{
padding: 20px; padding: 20px;
} }
.app-container {
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
}
/* Страница входа */ /* Страница входа */
.login-page { .login-page {
background-color: #1f2430; background-color: #1f2430;
@@ -101,13 +114,20 @@ ul{
} }
.page-container { .page-container {
flex: 1 1 auto; /* растёт и заполняет остаток */
display: flex;
flex-direction: column;
overflow-x: auto;
box-sizing: border-box;
background-color: #1f2430; background-color: #1f2430;
border-radius: 8px; border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
padding: 20px; padding: 20px;
margin: 10px auto; margin: 10px 0px;
max-width: 1200px; max-width: 99%;
} width: 100%; /* Занимает всю доступную ширину */
}
h2 { h2 {
text-align: center; text-align: center;

View File

@@ -77,9 +77,10 @@
.pagination { .pagination {
background-color: #2b3245; background-color: #2b3245;
display: flex; display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 8px; gap: 8px;
margin-top: 16px; margin-top: 16px;
flex-wrap: wrap;
padding: 10px; padding: 10px;
border-radius: 6px; border-radius: 6px;
} }

View File

@@ -8,44 +8,47 @@
} }
.header { .header {
background-color: #1f2430; flex: 0 0; /* не растёт, не сжимается, высота по контенту */
padding: 0; background-color: #1f2430;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); padding: 0;
height: 56px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
height: 56px;
width: 100%;
} }
.header-container { .header-container {
max-width: 1200px; max-width: 1200px;
margin: 0 auto; box-sizing: border-box;
display: flex; padding-left: 20px;
justify-content: space-between; margin: 0 auto;
align-items: center; display: flex;
padding: 0 1rem; justify-content: space-between;
height: 56px; align-items: center;
height: 56px;
} }
.logo h1 { .logo h1 {
font-family: 'Roboto Regular'; font-family: 'Roboto Regular';
margin: 0; margin: 0;
font-size: 24px; font-size: 24px;
color: #CAD1D8; color: #CAD1D8;
text-decoration: none; text-decoration: none;
} }
h1:hover { h1:hover {
color: white; color: white;
} }
.logo a { .logo a {
text-decoration: none; text-decoration: none;
} }
.nav-list { .nav-list {
opacity: 0; opacity: 0;
display: flex; display: flex;
list-style: none; list-style: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.nav-list.visible { .nav-list.visible {
@@ -54,26 +57,26 @@ h1:hover {
.nav-list li { .nav-list li {
padding: 0 1rem; padding: 0 1rem;
height: 56px; height: 56px;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.nav-list li:hover { .nav-list li:hover {
box-shadow: #08e8de 0px -2px inset; box-shadow: #08e8de 0px -2px inset;
background-color: rgba(0, 0, 0, 0.25) ; background-color: rgba(0, 0, 0, 0.25) ;
} }
.nav-list a { .nav-list a {
text-decoration: none; text-decoration: none;
color: #CAD1D8; color: #CAD1D8;
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 18px; font-size: 18px;
height: 56px; height: 56px;
} }
.nav-list a:hover { .nav-list a:hover {
color: white; color: white;
} }