From 10904ee98b48cd6af76bc8d87d8b9d5197687e63 Mon Sep 17 00:00:00 2001 From: pearpearB Date: Fri, 21 Apr 2023 12:38:21 +0900 Subject: [PATCH] =?UTF-8?q?[Feat]=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20Guest=EB=A1=9C=20=EC=9E=85=EC=9E=A5?= =?UTF-8?q?=ED=95=98=EA=B8=B0=20=EA=B5=AC=ED=98=84=20#49?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/buttons/ShiningButton.tsx | 10 +- hybrid/src/components/layout/Footer.tsx | 6 +- hybrid/src/components/layout/Header.tsx | 38 +------ hybrid/src/components/layout/LoginLayout.tsx | 25 ++++- hybrid/src/components/layout/Logo.tsx | 58 ++++++++++ .../src/components/layout/SocketConnect.tsx | 39 +++---- hybrid/src/pages/404.tsx | 4 +- hybrid/src/pages/login.tsx | 100 ++++++++++++++++-- hybrid/src/socket/responseHandler.tsx | 6 +- hybrid/src/styles/common-style.ts | 1 + hybrid/src/styles/global-style.tsx | 4 +- hybrid/src/styles/theme.ts | 1 + 12 files changed, 213 insertions(+), 79 deletions(-) create mode 100644 hybrid/src/components/layout/Logo.tsx diff --git a/hybrid/src/components/buttons/ShiningButton.tsx b/hybrid/src/components/buttons/ShiningButton.tsx index 495a6ae..d5cdcff 100644 --- a/hybrid/src/components/buttons/ShiningButton.tsx +++ b/hybrid/src/components/buttons/ShiningButton.tsx @@ -3,12 +3,18 @@ import styled from 'styled-components'; interface ShinningButtonProps { value: string; + moveTo: string; + clickHandler?: () => void; } -export default function ShiningButton({ value }: ShinningButtonProps) { +export default function ShiningButton({ + value, + moveTo, + clickHandler, +}: ShinningButtonProps) { return ( - + diff --git a/hybrid/src/components/layout/Footer.tsx b/hybrid/src/components/layout/Footer.tsx index 7360179..b709578 100644 --- a/hybrid/src/components/layout/Footer.tsx +++ b/hybrid/src/components/layout/Footer.tsx @@ -2,14 +2,14 @@ import styled from 'styled-components'; export default function Footer() { return ( - +

GitHub | Rule | Contact

Copyright © 2023 OkMoK. All rights reserved.

-
+ ); } -const FooterContainer = styled.footer` +const Container = styled.footer` ${({ theme }) => theme.flexs.centerColumn}; height: 3rem; margin: 1.5rem; diff --git a/hybrid/src/components/layout/Header.tsx b/hybrid/src/components/layout/Header.tsx index 8c24fff..0d6e1cd 100644 --- a/hybrid/src/components/layout/Header.tsx +++ b/hybrid/src/components/layout/Header.tsx @@ -1,17 +1,14 @@ import styled from 'styled-components'; +import Logo from './Logo'; + interface HeaderProps { children?: React.ReactNode; } + export default function Header({ children }: HeaderProps) { return ( -

- O - k - M - o - K -

+ {children}
); @@ -21,35 +18,8 @@ const Container = styled.header` ${({ theme }) => theme.flexs.center}; height: 5rem; margin: 1.5rem; - h1 { - font-size: ${({ theme }) => theme.fontsizes.xxlarge}; - span { - margin: 0 0.2rem; - } - span:nth-child(1) { - color: ${({ theme }) => theme.colors.red}; - } - span:nth-child(2) { - color: ${({ theme }) => theme.colors.green}; - } - span:nth-child(3) { - color: ${({ theme }) => theme.colors.blue}; - } - span:nth-child(4) { - color: ${({ theme }) => theme.colors.yellow}; - } - span:nth-child(5) { - color: ${({ theme }) => theme.colors.aqua}; - } - } @media (${({ theme: { device } }) => device.mobile}) { height: 2.5rem; margin: 0.8rem; - h1 { - font-size: ${({ theme }) => theme.fontsizes.xlarge}; - span { - margin: 0 0.1rem; - } - } } `; diff --git a/hybrid/src/components/layout/LoginLayout.tsx b/hybrid/src/components/layout/LoginLayout.tsx index 6a87e29..855cbb4 100644 --- a/hybrid/src/components/layout/LoginLayout.tsx +++ b/hybrid/src/components/layout/LoginLayout.tsx @@ -1,4 +1,6 @@ -import Header from './Header'; +import styled from 'styled-components'; +import { LayoutContainer } from '@/styles/common-style'; +import Logo from './Logo'; import Footer from './Footer'; interface LoginLayoutProps { @@ -7,10 +9,23 @@ interface LoginLayoutProps { export default function LoginLayout({ children }: LoginLayoutProps) { return ( - <> -
-
{children}
+ + + + + {children}