Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions src/frontend/apps/web/app/(main)/[stockSlug]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { ResizablePanelGroup, ResizablePanel, ResizableHandle } from '@workspace/ui/components';

import Chatbox from '@/src/features/chat/chatbox';

// 주식데이터를 가지고 올수있는 방법이 필요합니다.

export async function generateMetadata({ params }) {
const { stockSlug } = params;

return {
title: `${stockSlug} - 주식 정보`,
description: `${stockSlug}의 최신 주식 정보를 확인하세요.`,
keywords: `주식, ${stockSlug}, 주식 정보`,
};
}

export default function StockDetailsPage({ params }) {
const { stockSlug } = params;
// console.log(1, params);

return (
<div className="flex flex-1 flex-row">
<div className="flex items-center justify-center bg-gray-200 w-[45%] h-full">Stock Chart</div>

<div className="flex items-center justify-center py-6 pr-[30px] pl-2 bg-gray-400 w-[55%] h-full">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pl외의 다른 패딩값은 주식과 채팅 동일하게 한번에 적용하시는건 어떠신가요? 이렇게 하신 이유가 있다면 수정하지 않으셔도 됩니다!
저는 와이어프레임 기준 주식차트와 채팅의 양쪽과 아래쪽 패딩이 일치하다고 생각했는데 채팅만 따로 패딩값을 주신게 궁금합니다!
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아하 요거까진 제가 따로 고려하진 않았었는데 좋은 것 같습니다. 수정하겠습니다. (:

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@handje
image

새로운 레이이아웃을 전부 적용과 나머지 컴포넌트 모듈화까지 진행했습니다!

컴포넌트 명 같은 경우에는 제가 고민해봤을때

Layout은 페이지나 섹션의 레이아웃을 정의하기때문에 StockLayout으로

Container는 보통 구성 요소들을 담는 역할을 하는 컴포넌트이기때문에 Chatbox -> ChatContainer로 수정해보았습니다. 한번 컨펌해주시면 감사하겠습니다!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

깔끔하고 좋네요! 👍 👍

<Chatbox />
</div>
</div>
);
}
19 changes: 19 additions & 0 deletions src/frontend/apps/web/app/(main)/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import '@workspace/ui/globals.css';

export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html
lang="en"
suppressHydrationWarning
>
<body>
<header className="h-[68px] bg-gray-800 flex items-center justify-center text-white">Header</header>
<div className="flex flex-col h-[calc(100vh-68px)] overflow-hidden">{children}</div>
</body>
</html>
);
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { Button } from '@workspace/ui/components';
import Link from 'next/link';

export default function Page() {
// 버튼 예시
return (
<div className="flex items-center justify-center min-h-svh">
<div className="flex flex-col items-center justify-center gap-4">
<h1 className="text-2xl font-bold">Hello World</h1>
<Button size="sm">Button</Button>
<Button size="sm">
<Link href="/tesla">Button</Link>
</Button>
</div>
</div>
);
Expand Down
3 changes: 1 addition & 2 deletions src/frontend/apps/web/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import localFont from 'next/font/local';

import '@workspace/ui/globals.css';
import { Providers } from '@/src/shared';

const geistSans = localFont({
src: './fonts/GeistVF.woff',
Expand All @@ -23,7 +22,7 @@ export default function RootLayout({
suppressHydrationWarning
>
<body className={`${geistSans.variable} ${geistMono.variable} font-sans antialiased `}>
<Providers>{children}</Providers>
<div>{children}</div>
</body>
</html>
);
Expand Down
18 changes: 18 additions & 0 deletions src/frontend/apps/web/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import Link from 'next/link';
import { NextPage } from 'next';
import { Button } from '@workspace/ui/components';

const NotFound: NextPage = () => {
return (
<div className="flex items-center justify-center min-h-svh">
<div className="flex flex-col items-center justify-center gap-4">
<div>이 페이지는 존재하지 않습니다. 매인 페이지로 이동하세요.</div>
<Button>
<Link href="/">메인페이지로 이동하기</Link>
</Button>
</div>
</div>
);
};

export default NotFound;
Empty file.
5 changes: 5 additions & 0 deletions src/frontend/apps/web/src/features/chat/chatbox.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const Chatbox = () => {
return <div className="bg-gray-200 w-full h-full">123</div>;
};

export default Chatbox;
Loading