Compare commits
2 Commits
dadb094017
...
4ff56ec06c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ff56ec06c | ||
|
|
3b6f544946 |
@ -133,7 +133,7 @@ def registerUserEndpoints(app, database):
|
||||
|
||||
attendance_status = attendance_result[0][0]
|
||||
|
||||
return jsonify(success=True, attendance=bool(attendance_status)), 200
|
||||
return jsonify(success=True, attendance=attendance_status), 200
|
||||
|
||||
except Exception as e:
|
||||
return jsonify(success=False, message=str(e)), 500
|
||||
|
||||
@ -6,20 +6,23 @@ import InitialSetup from './components/InitialSetup';
|
||||
import Program from './components/Program';
|
||||
import Snowflakes from './components/Snowflakes';
|
||||
import { FullScreenLoading } from './components/Loading';
|
||||
import SecretSanta from './components/SecretSanta';
|
||||
import Suggestions from './components/Suggestions';
|
||||
import AttendanceTable from './components/AttendnaceTable';
|
||||
|
||||
function App() {
|
||||
const [isNavOpen, setIsNavOpen] = useState(false);
|
||||
|
||||
const handleLogout = () => {
|
||||
const cookies = document.cookie.split(";");
|
||||
const handleLogout = () => {
|
||||
const cookies = document.cookie.split(";");
|
||||
|
||||
for (let cookie of cookies) {
|
||||
const cookieName = cookie.split("=")[0].trim();
|
||||
// Set the cookie's expiration date to the past to delete it
|
||||
document.cookie = `${cookieName}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/;`;
|
||||
}
|
||||
window.location.reload();
|
||||
};
|
||||
for (let cookie of cookies) {
|
||||
const cookieName = cookie.split("=")[0].trim();
|
||||
// Set the cookie's expiration date to the past to delete it
|
||||
document.cookie = `${cookieName}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/;`;
|
||||
}
|
||||
window.location.reload();
|
||||
};
|
||||
|
||||
const toggleNav = () => {
|
||||
setIsNavOpen(!isNavOpen);
|
||||
@ -27,7 +30,7 @@ function App() {
|
||||
|
||||
return (
|
||||
<>
|
||||
<FullScreenLoading/>
|
||||
<FullScreenLoading />
|
||||
<Snowflakes />
|
||||
<InitialSetup />
|
||||
|
||||
@ -46,6 +49,15 @@ function App() {
|
||||
<li>
|
||||
<a href="#program">Программа</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#suggestions">Пожелания</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#santa">Secret Santa</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#attendance-table">Кто празднует?</a>
|
||||
</li>
|
||||
<li>
|
||||
<button onClick={() => handleLogout()}>Выйти</button>
|
||||
</li>
|
||||
@ -61,6 +73,15 @@ function App() {
|
||||
<div id="program">
|
||||
<Program />
|
||||
</div>
|
||||
<div id="suggestions">
|
||||
<Suggestions />
|
||||
</div>
|
||||
<div id="santa">
|
||||
<SecretSanta />
|
||||
</div>
|
||||
<div id="attendance-table">
|
||||
<AttendanceTable />
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
19
frontend/src/components/AttendnaceTable.tsx
Normal file
19
frontend/src/components/AttendnaceTable.tsx
Normal file
@ -0,0 +1,19 @@
|
||||
import CenteredContainer from "./ChildrenContainer";
|
||||
|
||||
function AttendanceTable() {
|
||||
|
||||
return (
|
||||
<>
|
||||
<CenteredContainer>
|
||||
<h2>Кто празднует?</h2>
|
||||
<p className="mainText">
|
||||
Вскоре, вы сможете видеть всех, кто приедет и будет праздновать с нами. Данная фича по полной в разработке!
|
||||
<br/><br/>
|
||||
Таблица в производстве... Ожидайте к <b>началу-середние ноября</b>
|
||||
</p>
|
||||
</CenteredContainer>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default AttendanceTable;
|
||||
19
frontend/src/components/SecretSanta.tsx
Normal file
19
frontend/src/components/SecretSanta.tsx
Normal file
@ -0,0 +1,19 @@
|
||||
import CenteredContainer from "./ChildrenContainer";
|
||||
|
||||
function SecretSanta() {
|
||||
|
||||
return (
|
||||
<>
|
||||
<CenteredContainer>
|
||||
<h2>Secret Santa</h2>
|
||||
<p className="mainText">
|
||||
Тут вы сможете узнать кому вы дарите свой подарок, а так же увидеть его вишлист, если он его добавит. Вы тоже сможете добавить свой вишлист, если захотите, чтобы ваш санта его видел!
|
||||
<br/><br/>
|
||||
Таблица в производстве... Ожидайте к <b>середине-концу ноября</b>
|
||||
</p>
|
||||
</CenteredContainer>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default SecretSanta;
|
||||
19
frontend/src/components/Suggestions.tsx
Normal file
19
frontend/src/components/Suggestions.tsx
Normal file
@ -0,0 +1,19 @@
|
||||
import CenteredContainer from "./ChildrenContainer";
|
||||
|
||||
function Sugegstions() {
|
||||
|
||||
return (
|
||||
<>
|
||||
<CenteredContainer>
|
||||
<h2>Ваши предложения и пожелания</h2>
|
||||
<p className="mainText">
|
||||
Тут вы можете оставить ваши пожелания/предпочтения для чего-либо. Хотите ли вы купить ракеты, поехат в какой-то из дней куда-то, какое основное блюдо вы бы хотели тд и тп...
|
||||
<br/><br/>
|
||||
Таблица в производстве... Ожидайте к <b>середине-концу ноября</b>
|
||||
</p>
|
||||
</CenteredContainer>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default Sugegstions;
|
||||
Loading…
x
Reference in New Issue
Block a user