Skip to content

Commit

Permalink
Merge pull request #32 from chhw130/dev
Browse files Browse the repository at this point in the history
PR : notfound Page
  • Loading branch information
chhw130 authored Dec 16, 2023
2 parents 3a3df78 + daf9f54 commit 5828165
Show file tree
Hide file tree
Showing 15 changed files with 1,170 additions and 37 deletions.
4 changes: 2 additions & 2 deletions component/Funnel/MainFunnel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const MainFunnel = ({ setFunnel }: MainFunnelPropsType) => {
을 추천 받자!
</Heading>

<VStack spacing={"1px"} marginTop={"10%"}>
<VStack spacing={"1px"} marginTop={"55px"}>
<Card bgColor={"#FFFFFF20"}>
<CardBody textAlign={"center"} color={"#D2D2D2"}>
나.. 오늘 얼마나 먹었더라?
Expand All @@ -69,7 +69,7 @@ const MainFunnel = ({ setFunnel }: MainFunnelPropsType) => {
<ButtonGroup
width={"100%"}
pos={"absolute"}
bottom={"100px"}
bottom={"3vh"}
padding={"0 22px"}
justifyContent={"center"}
>
Expand Down
24 changes: 16 additions & 8 deletions component/card/ChattingRoom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import DietChattingMsgCart from "./DietChattingMsgCard";
import ChattingInput from "../input/ChattingInput";
import HealthIcon from "../icon/HealthIcon";
import UserChattingMsgCard from "./UserChattingMsgCard";
import { usePostUserDiet } from "../../utils/hooks/usePostUserDiet";
import {
SubmitHandler,
UseFormHandleSubmit,
Expand Down Expand Up @@ -37,13 +36,9 @@ const ChattingRoom = ({
<>
<Flex
w={"100%"}
h={"100%"}
bgColor={"#F4F4F4"}
h={"75%"}
maxH={"1150px"}
minH={"300px"}
borderRadius={"12px 12px 0 0"}
position={"absolute"}
bottom={"0"}
flexDir={"column"}
>
<VStack
Expand Down Expand Up @@ -73,9 +68,10 @@ const ChattingRoom = ({
<VStack
w={"100%"}
alignItems={"flex-start"}
h={"62vh"}
spacing={"16px"}
marginTop={"10px"}
paddingBottom={"80px"}
marginTop={"1vh"}
paddingBottom={"15%"}
overflow={"hidden"}
overflowY={"scroll"}
css={{
Expand All @@ -100,6 +96,18 @@ const ChattingRoom = ({
</Text>
</ChattingMsgCard>

<UserChattingMsgCard>
아침은 계란후라이 점심은 마라탕 저녁은 칼국수를 먹었어
</UserChattingMsgCard>
<UserChattingMsgCard>
아침은 계란후라이 점심은 마라탕 저녁은 칼국수를 먹었어
</UserChattingMsgCard>
<UserChattingMsgCard>
아침은 계란후라이 점심은 마라탕 저녁은 칼국수를 먹었어
</UserChattingMsgCard>
<UserChattingMsgCard>
아침은 계란후라이 점심은 마라탕 저녁은 칼국수를 먹었어
</UserChattingMsgCard>
<UserChattingMsgCard>
아침은 계란후라이 점심은 마라탕 저녁은 칼국수를 먹었어
</UserChattingMsgCard>
Expand Down
22 changes: 18 additions & 4 deletions component/card/DietChattingMsgCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ import {
Heading,
Spinner,
Text,
VStack,
} from "@chakra-ui/react";
import WarningIcon from "../icon/WarningIcon";
import { useRouter } from "next/navigation";
import { DietResponse } from "../../utils/api/AxiosSetting";
import Lottie from "lottie-react";
import LoadingLotte from "../../utils/json/loading.json";
import SaladIcon from "../icon/SaladIcon";

interface DietChattingMsgCard extends CardProps {
isLoading: boolean;
Expand All @@ -30,14 +34,24 @@ const DietChattingMsgCart = ({
return (
<>
<Card
w={isLoading ? "187px" : "312px"}
w={!isLoading ? "197px" : "312px"}
bgColor={"#FFFFFF"}
shadow={"none"}
margin={"0px 0px 0px 22px"}
>
{isLoading && (
<CardBody>
<Spinner />
{!isLoading && (
<CardBody padding={"16px 14px"}>
<VStack>
<SaladIcon />
<Box w={"30%"}>
<Lottie animationData={LoadingLotte} />
</Box>
<Text color={"#2F2F2F"} fontSize={"18px"}>
식선생이 오늘의
<br />
식사를 분석하고 있어요
</Text>
</VStack>
</CardBody>
)}
{dietResponseData && !isLoading && (
Expand Down
12 changes: 6 additions & 6 deletions component/form/UserPhysicForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const UserPhysicForm = ({ userInfo }: UserPhysicsFormPropsType) => {

const path = usePathname();

const { postUserInfoMutation, isLoading, data } = usePostUserInfo();
const { postUserInfoMutation, isLoading, data: userId } = usePostUserInfo();
const {
handleSubmit,
register,
Expand All @@ -50,11 +50,11 @@ const UserPhysicForm = ({ userInfo }: UserPhysicsFormPropsType) => {
targetweight: parseInt(data.targetweight),
};

if (path === "/signup") {
localStorage.setItem("userInfo", JSON.stringify(newUserInfo));
} else {
await postUserInfoMutation(newUserInfo);
}
await postUserInfoMutation(newUserInfo);

console.log(userId);

localStorage.setItem("userId", userId.user_id);

router.push("/main");
};
Expand Down
50 changes: 50 additions & 0 deletions component/icon/NotFoundIcon.tsx

Large diffs are not rendered by default.

Loading

0 comments on commit 5828165

Please sign in to comment.