-
Выбери себя
-
- {GUESTS.map((name) => (
-
- ))}
-
-
- );
-};
-
-const styles = {
- container: {
- position: 'fixed' as 'fixed',
- top: 0,
- left: 0,
- width: '100vw',
- height: '100vh',
- backgroundColor: 'rgba(0, 0, 0, 1)',
- display: 'flex',
- flexDirection: 'column' as 'column',
- justifyContent: 'center',
- alignItems: 'center',
- color: '#fff',
- zIndex: 1000,
- },
- title: {
- marginBottom: '20px',
- },
- namesContainer: {
- display: 'flex',
- flexDirection: 'column' as 'column',
- },
- button: {
- margin: '10px',
- padding: '10px 20px',
- fontSize: '16px',
- cursor: 'pointer',
- },
-};
-
-export default NameSelector;
diff --git a/frontend/src/utils/fetchUser.tsx b/frontend/src/utils/fetchUser.tsx
new file mode 100644
index 0000000..0cdafe3
--- /dev/null
+++ b/frontend/src/utils/fetchUser.tsx
@@ -0,0 +1,124 @@
+import { useState } from 'react';
+import { useCookies } from 'react-cookie';
+
+interface User {
+ password?: string;
+}
+
+interface UserData {
+ [key: string]: User;
+}
+
+const useFetchUser = () => {
+ const [cookies, setCookie] = useCookies(['apiToken']);
+
+ const userSet = async (userName: string): Promise