Skip to content

Commit

Permalink
chore : 로그인 배너 수정 및 css조정
Browse files Browse the repository at this point in the history
  • Loading branch information
0xC0FFE2 committed Jan 17, 2025
1 parent 756368a commit 02e85a1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/components/auth/LoginBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';

const LoginBanner = () => {
return (
<div className="w-[600px] relative bg-cover bg-center" style={{
<div className="w-[600px] relative bg-cover bg-center hidden sm:block" style={{
backgroundImage: `url('https://nanu.cc/NANU-Brand-Loader.jpg')`
}}>
<div className="absolute top-10 left-10">
Expand Down
2 changes: 1 addition & 1 deletion src/components/auth/LoginContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interface LoginContainerProps {
const LoginContainer: React.FC<LoginContainerProps> = ({ children }) => {
return (
<div className="min-h-screen w-full bg-gray-50 flex items-center justify-center py-8">
<div className="w-[1200px] h-[600px] bg-white shadow-lg overflow-hidden flex">
<div className="w-[1200px] h-[600px] bg-white overflow-hidden flex">
{children}
</div>
</div>
Expand Down
28 changes: 14 additions & 14 deletions src/pages/LoginPage.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useState } from 'react';
import { useNavigate } from 'react-router-dom';
import LoginContainer from '../components/auth/LoginContainer';
import LoginBanner from '../components/auth/LoginBanner';
import LoginForm from '../components/auth/LoginForm';
import React, { useState } from "react";
import { useNavigate } from "react-router-dom";
import LoginContainer from "../components/auth/LoginContainer";
import LoginBanner from "../components/auth/LoginBanner";
import LoginForm from "../components/auth/LoginForm";

interface LoginFormData {
email: string;
Expand All @@ -12,30 +12,30 @@ interface LoginFormData {

const LoginPage = () => {
const [formData, setFormData] = useState<LoginFormData>({
email: '',
password: '',
rememberMe: false
email: "",
password: "",
rememberMe: false,
});

const navigate = useNavigate();

const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const { name, value, type, checked } = e.target;
setFormData(prev => ({
setFormData((prev) => ({
...prev,
[name]: type === 'checkbox' ? checked : value
[name]: type === "checkbox" ? checked : value,
}));
};

const handleLogin = (type: 'app' | 'pin') => {
const handleLogin = (type: "app" | "pin") => {
// TODO: Implement login logic
console.log(`Logging in with ${type}`, formData);
};

return (
<LoginContainer>
<LoginBanner />
<LoginForm
<LoginForm
formData={formData}
onInputChange={handleInputChange}
onLogin={handleLogin}
Expand All @@ -44,4 +44,4 @@ const LoginPage = () => {
);
};

export default LoginPage;
export default LoginPage;

0 comments on commit 02e85a1

Please sign in to comment.