Skip to content

Commit

Permalink
Merge pull request #25 from chhw130/dev
Browse files Browse the repository at this point in the history
feat(metadata) : 메타데이터 추가
  • Loading branch information
chhw130 authored Dec 16, 2023
2 parents 8235435 + 9784da5 commit 8a737ed
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 12 deletions.
2 changes: 2 additions & 0 deletions component/button/MainButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const MainButton = ({
color,
_disabled,
_hover,
isLoading,
}: ButtonProps) => {
return (
<Button
Expand All @@ -29,6 +30,7 @@ const MainButton = ({
type={type}
_disabled={_disabled}
_hover={_hover}
isLoading={isLoading}
>
{children}
</Button>
Expand Down
1 change: 0 additions & 1 deletion component/card/DietStateCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Box, Flex, HStack, Text } from "@chakra-ui/react";
import HealthMountainIcon from "../icon/HealthMountainIcon";
import { ReactNode } from "react";

const DietStateCard = ({ children }: { children: ReactNode }) => {
Expand Down
1 change: 1 addition & 0 deletions component/form/UserPhysicForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ const UserPhysicForm = ({ userInfo }: UserPhysicsFormPropsType) => {
<MainButton
w={"100%"}
h={"52px"}
isLoading={isLoading}
_disabled={{
bgColor: "#D2D2D2",
color: "#FFFFFF",
Expand Down
2 changes: 0 additions & 2 deletions component/template/SignupTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ const SignupTemplate = ({ jwtToken }: { jwtToken: JwtToken }) => {
});
const { funnel, setFunnel } = useFunnel("userAgreement");

localStorage.setItem(`jwt`, jwtToken.jwt);

return (
<>
<Progress
Expand Down
Binary file modified src/app/favicon.ico
Binary file not shown.
27 changes: 24 additions & 3 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
import type { Metadata } from "next";
import { ChakraLayout } from "@/app/ChakraLayout";
import QueryLayout from "./QueryLayout";
import { ColorModeScript } from "@chakra-ui/react";
import OGImg from "../../utils/img/OGImg.jpg";

export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
// metadataBase: new URL("https://www.choeaein.click/"),
title: "식선생",
description: "당신의 식단 관리 서비스",
openGraph: {
title: "식선생",
description: "당신의 식단 관리 서비스",
// url: "https://www.choeaein.click/",
siteName: "foodteacher",
images: [
{
url: "../../utils/img/OGImg.jpg",
width: 800,
height: 600,
},
{
url: "../../utils/img/OGImg.jpg",
width: 1800,
height: 1600,
},
],
locale: "en_US",
type: "website",
},
};

export default function RootLayout({
Expand Down
17 changes: 14 additions & 3 deletions src/app/main/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import TheHeader from "../../../component/header/TheHeader";
import UserIcon from "../../../component/icon/UserIcon";
import TextLogoIcon from "../../../component/icon/TextLogoIcon";
import HealthMountainIcon from "../../../component/icon/HealthMountainIcon";
import Image from "next/image";
import mainStage1 from "../../../utils/img/mainStage1.png";

const Page = () => {
const router = useRouter();
Expand Down Expand Up @@ -63,13 +65,22 @@ const Page = () => {
<Text fontSize={"16px"} color={"#787878"}>
200Kcal 초과
</Text>
<Heading>
오늘 <Text color={"#40E98E"}>30분 이상 달려야</Text>
<Heading fontSize={"22px"}>
오늘{" "}
<Text as={"a"} color={"#40E98E"}>
30분 이상 달려야
</Text>
<br />
현재 몸무게 안정권 유지
</Heading>
</Box>
<HealthMountainIcon />
<Image
src={mainStage1}
alt="메인 캐릭터"
placeholder="blur"
style={{ width: "104px", height: "auto" }}
quality={100}
/>
</HStack>
</DietStateCard>
)}
Expand Down
6 changes: 4 additions & 2 deletions utils/api/AxiosSetting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ const instacne = axios.create({
},
});

const jwtToken = localStorage.getItem(`jwt`);

export interface DietResponse {
아침: string;
점심: string;
Expand All @@ -34,9 +32,13 @@ export const postKakaoCode = async (code: string) => {
};

export const postUserInfo = async (userInfo: UserInfoType) => {
const jwtToken = localStorage.getItem(`jwt`);
console.log(jwtToken);

const res = await instacne.post("", userInfo, {
headers: { Authorization: `Bearer ${jwtToken}` },
});

return res.data;
};

Expand Down
3 changes: 2 additions & 1 deletion utils/hooks/usePostUserInfo.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { useMutation } from "@tanstack/react-query";
import { postUserInfo } from "../api/AxiosSetting";
import { UserInfoType } from "../../component/template/SignupTemplate";

export const usePostUserInfo = () => {
const {
data,
mutateAsync: postUserInfoMutation,
isLoading,
} = useMutation({
mutationFn: () => postUserInfo(),
mutationFn: (userInfo: UserInfoType) => postUserInfo(userInfo),
onError: () => {},
onSuccess: () => {},
});
Expand Down
Binary file added utils/img/OGImg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8a737ed

Please sign in to comment.