diff --git a/app/(route)/indicators/_components/result/index.tsx b/app/(route)/indicators/_components/result/index.tsx
index 9d8bdc4..3352f8f 100644
--- a/app/(route)/indicators/_components/result/index.tsx
+++ b/app/(route)/indicators/_components/result/index.tsx
@@ -1,17 +1,39 @@
import Nav from '@/app/_common/nav'
import Title from '@/app/_common/text/title'
+import { investmentItemAtom, totalinputValueAtom } from '@/app/_store/atom'
+import { useRecoilValue } from 'recoil'
import S from './result.module.css'
+//* 결과페이지 입니다.
//TODO: 사용자가 클릭한 아이디어 이름과 해당 툴을 사용한 사용자 수가 보여집니다.
function Result() {
+ const selectedItem = useRecoilValue(investmentItemAtom)
+ const totalinputValue = parseInt(useRecoilValue(totalinputValueAtom))
+
return (
+
-
- 전체 사용자 162명
+ 아이디어 이름
+
전체 사용자 162명
+
+
+
+ 검증 지표
+
계산 결과지입니다.
+
+
전체 이용자 수 : {totalinputValue}
+
+ {selectedItem.map((item) => (
+
+
선택한 아이템 이름: {item.name}
+
선택한 아이템 점수: {item.score}
+
최종 점수: {item.score && item.score * totalinputValue}
+
+ ))}
diff --git a/app/(route)/indicators/_components/result/result.module.css b/app/(route)/indicators/_components/result/result.module.css
index 5d37d8f..9b75633 100644
--- a/app/(route)/indicators/_components/result/result.module.css
+++ b/app/(route)/indicators/_components/result/result.module.css
@@ -4,3 +4,13 @@
padding-bottom: 50px;
padding: 0 18px;
}
+
+.title {
+ font-size: 1.2rem;
+ font-weight: 700;
+}
+
+.subTitle {
+ font-size: 0.9rem;
+ font-weight: 400;
+}
diff --git a/app/(route)/indicators/indicators.module.css b/app/(route)/indicators/indicators.module.css
index c317b80..e78b008 100644
--- a/app/(route)/indicators/indicators.module.css
+++ b/app/(route)/indicators/indicators.module.css
@@ -22,7 +22,11 @@
overflow: auto;
height: 690px;
width: 100%;
- gap: 14px;
+ gap: 6px;
+}
+
+.marginWrapper {
+ margin-bottom: 50px;
}
.bottomWrapper {
diff --git a/app/(route)/indicators/page.tsx b/app/(route)/indicators/page.tsx
index 3381b47..0b15a40 100644
--- a/app/(route)/indicators/page.tsx
+++ b/app/(route)/indicators/page.tsx
@@ -1,32 +1,41 @@
'use client'
import Title from '@/app/_common/text/title'
+import { totalinputValueAtom } from '@/app/_store/atom'
import { useRouter } from 'next/navigation'
import { useState } from 'react'
+import { useRecoilState } from 'recoil'
import Nav from '../list/_components/nav'
+import ActiveInvestmentList from '../verification/ibulsin/_components/ActiveInvestmentList'
import FormTitle from './_components/form/FormTitle'
import FormS from './_components/form/form.module.css'
import S from './indicators.module.css'
//* 투자 지표 입력 페이지입니다.
//TODO: title에 사용자가 입력했던 요소들이 보여지게 됩니다.
-//TODO: recoil 사용
-//? 피기님이 하신 투자지표 툴로 변경 예정
function Indicators() {
const router = useRouter()
- const [inputValue, setInputValue] = useState('')
+ const [inputValue, setInputValue] = useRecoilState(totalinputValueAtom)
const [error, setError] = useState('')
+ const [checkError, setCheckError] = useState('')
+ const [selectedIndex, setSelectedIndex] = useState(null)
const handleChange = (e: React.ChangeEvent) => {
setInputValue(e.target.value)
setError('')
}
- const handleSubmit = (e: React.FormEvent) => {
- e.preventDefault()
- if (!/^\d+$/.test(inputValue)) {
+ const handleSubmit = () => {
+ if (!/^\d+$/.test(inputValue) && selectedIndex === null) {
setError('숫자만 입력 가능합니다.')
+ setCheckError('지표 항목을 한가지 선택해야 합니다.')
+ } else if (!/^\d+$/.test(inputValue)) {
+ setError('숫자만 입력 가능합니다.')
+ } else if (selectedIndex === null) {
+ setCheckError('지표 항목을 한가지 선택해야 합니다.')
} else {
+ setError('')
+ setCheckError('')
router.push('/result')
}
}
@@ -38,33 +47,50 @@ function Indicators() {