-
+
+
+ {isLogin ? (
+ <>
+
+
+
+
+ >
+ ) : (
+
+ )}
>
diff --git a/src/routes/router.tsx b/src/routes/router.tsx
index 2bebce7..69fcb8e 100644
--- a/src/routes/router.tsx
+++ b/src/routes/router.tsx
@@ -1,12 +1,12 @@
-import EnterLocation from '@/pages/enter-location';
import Home from '@/pages/home';
import LocationAlone from '@/pages/location-alone';
-import LocationEach from '@/pages/location-each';
import NotFound from '@/pages/not-found';
import Midpoint from '@/pages/midpoint';
import Vote from '@/pages/vote';
import Time from '@/pages/time';
import { createBrowserRouter } from 'react-router-dom';
+import LocationEach from '@/pages/location-each';
+import Layout from '@/pages/Layout';
export const router = createBrowserRouter([
{
@@ -14,15 +14,15 @@ export const router = createBrowserRouter([
element:
,
},
{
- path: '/enter-location',
- element:
,
+ path: '/page',
+ element:
,
children: [
{
- path: '',
+ path: 'alone/:roomId',
element:
,
},
{
- path: ':roomId',
+ path: 'each/:roomId',
element:
,
},
],
diff --git a/src/styled.d.ts b/src/styled.d.ts
index faa468b..0b760de 100644
--- a/src/styled.d.ts
+++ b/src/styled.d.ts
@@ -2,7 +2,7 @@ import 'styled-components';
declare module 'styled-components' {
export interface DefaultTheme {
- lightPurple: string;
+ bgColor: string;
mainColor: string;
}
}
diff --git a/src/styles/shared/theme.ts b/src/styles/shared/theme.ts
index 73fca58..ef63f67 100644
--- a/src/styles/shared/theme.ts
+++ b/src/styles/shared/theme.ts
@@ -1,6 +1,6 @@
import { DefaultTheme } from 'styled-components';
export const theme: DefaultTheme = {
- lightPurple: '#F6F7FB',
- mainColor: '#5142FF',
+ bgColor: '#EFF3FF',
+ mainColor: '#5786FF',
};
diff --git a/src/types/Login/index.ts b/src/types/Login/index.ts
new file mode 100644
index 0000000..eb16269
--- /dev/null
+++ b/src/types/Login/index.ts
@@ -0,0 +1,13 @@
+import * as yup from 'yup';
+
+// 비밀번호 유효성 검사 스키마
+export const schema = yup.object().shape({
+ name: yup.string().required('이름을 입력해주세요'),
+ pw: yup
+ .string()
+ .required('비밀번호를 입력해주세요')
+ .matches(
+ /^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]{8,}$/,
+ '비밀번호는 영문 대/소문자, 숫자, 특수문자가 포함되어야 합니다',
+ ),
+});