Skip to content

Commit

Permalink
docs(#64): 가정학습 디테일 dummy data 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
uiop5809 committed May 20, 2024
1 parent a48e890 commit 9a76b01
Show file tree
Hide file tree
Showing 18 changed files with 241 additions and 63 deletions.
9 changes: 9 additions & 0 deletions public/assets/study/detail/english1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/assets/study/detail/english2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/assets/study/detail/korean1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/assets/study/detail/korean2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/assets/study/detail/korean3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/assets/study/detail/korean4.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/assets/study/detail/korean5.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/assets/study/detail/math1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/assets/study/detail/math2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/assets/study/detail/science1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/assets/study/detail/science2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/assets/study/detail/science3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/assets/study/detail/society1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 0 additions & 20 deletions src/app/study/layout.tsx

This file was deleted.

26 changes: 0 additions & 26 deletions src/app/study/page.tsx

This file was deleted.

62 changes: 48 additions & 14 deletions src/components/study/detail/Content.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,58 @@
import styled from "styled-components";
import EditorNote from "./EditorNote";
import Image from "next/image";

const TEXT1 = `지난 겨울방학동안 3학년 과학 교과서에 있는 실험들을 직접 집에서 했어요!`;
const TEXT2 = `과학교사 엄마라는 특권은 누려야되지 않겠냐며 미리 받아온 교과서를 뒤적이다 중학생들과 함께해도 재미있는 오호 만들과학교사 엄마라는 특권은 누려야되지 않겠냐며 미리 받아온 교과서를 뒤적이다 중학생들과 함께해도 재미있는\n\n 오호 만들과학교사 엄마라는 특권은 누려야되지 않겠냐며 미리 받아온 교과서를 뒤적이다 중학생들과 함께해도 재미있는 오호 만들과학교사 엄마라는 특권은 누려야되지 않겠냐며 미리 받아온 교과서를 뒤적이다 중학생들과 함께해도 재미있는 오호 만들과학교사 엄마라는 특권은 누려야되지 않겠냐며 미리 받아온 교과서를 뒤적이다 중학생들과 함께해도 재미있는 오호 만들`;
import { usePathname } from "next/navigation";
import { ReviewData } from "@/data/reviewData";

const Content = () => {
const pathname = usePathname();
const id = pathname.split("/").pop();
const review = ReviewData.find((review) => review.id === Number(id));

return (
<Container>
<EditorNote />
<Text>{TEXT1}</Text>
<ImageBox>
<Image
src="/assets/study/study.svg"
alt="study"
layout="fill"
objectFit="contain"
/>
</ImageBox>
<Text>{TEXT2}</Text>
{review && (
<>
<EditorNote editorNote={review.editorNote ? review.editorNote : ""} />
{review.text1 && <Text>{review.text1}</Text>}
{review.image1 && (
<ImageBox>
<Image
src={review.image1}
alt="study"
layout="fill"
objectFit="contain"
/>
</ImageBox>
)}

{review.text2 && <Text>{review.text2}</Text>}
{review.image2 && (
<ImageBox>
<Image
src={review.image2}
alt="study"
layout="fill"
objectFit="contain"
/>
</ImageBox>
)}

{review.text3 && <Text>{review.text3}</Text>}
{review.image3 && (
<ImageBox>
<Image
src={review.image3}
alt="study"
layout="fill"
objectFit="contain"
/>
</ImageBox>
)}

{review.text4 && <Text>{review.text4}</Text>}
</>
)}
</Container>
);
};
Expand Down
10 changes: 7 additions & 3 deletions src/components/study/detail/EditorNote.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import styled from "styled-components";

const CONTEXT = `겨울 방학동안 아이와 함께 집에서 실험한 엄마표\n 과학교실입니다! 재밌게 봐주세용`;
interface EditorNoteProps {
editorNote: string;
}

const EditorNote = (props: EditorNoteProps) => {
const { editorNote } = props;

const EditorNote = () => {
return (
<Container>
<Title>에디터의 노트</Title>
<Context>{CONTEXT}</Context>
<Context>{editorNote}</Context>
</Container>
);
};
Expand Down
69 changes: 69 additions & 0 deletions src/data/reviewData.ts

Large diffs are not rendered by default.

0 comments on commit 9a76b01

Please sign in to comment.