Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
# Common
.DS_Store
*.log
.env
.env
*.pem
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# PiroCheck
# 🏫 PiroCheck
피로그래밍 과제/출석/보증금 관리 서비스
3 changes: 2 additions & 1 deletion frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ dist-ssr
*.sw?


.env
*.env
*.pem
10 changes: 10 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"preview": "vite preview"
},
"dependencies": {
"lucide-react": "^0.507.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-router-dom": "^7.5.3"
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import React from "react";
import InputBlock from "./components/InputBlock";
import InfoBlock from "./components/InfoBlock";
import PageBtn from "./components/PageBtn";
import Header from "./components/Header";

function App() {
return (
<>
<Header />
<div>
<InputBlock />
<InfoBlock />
Expand Down
Binary file added frontend/src/assets/img/arrowicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions frontend/src/assets/img/arrowicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/assets/img/moneyicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions frontend/src/assets/img/moneyicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions frontend/src/components/Header.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import React from 'react';
import { useNavigate, useLocation } from 'react-router-dom';
import { ArrowLeft, Wallet } from 'lucide-react';
import './componentsCss/Header.css';
import arrowIcon from '../assets/img/arrowicon.svg';
import moneyIcon from '../assets/img/moneyicon.svg';
const Header = () => {
const navigate = useNavigate();
const location = useLocation();
const path = location.pathname;

let title = "ATTENDANCE CHECK";
if (path.includes('assignment')) title = "ASSIGNMENT CHECK";
else if (path.includes('deposit')) title = "DEPOSIT";

const showRightButton = !path.includes('deposit');

return (
<header className="header-container">
<button className="icon-button" onClick={() => navigate(-1)} aria-label="뒤로가기">
<img src={arrowIcon} alt="Back" width={34} height={34} />
</button>
<h1 className="header-title">{title}</h1>
{showRightButton ? (
<button className="icon-button" onClick={() => navigate('/deposit')} aria-label="보증금 페이지 이동">
<img src={moneyIcon} alt="Deposit" width={30} height={30} />
</button>
) : (
<div style={{ width: '30px' }} /> // 오른쪽 공백 유지
)}
</header>
);
};

export default Header;
27 changes: 27 additions & 0 deletions frontend/src/components/componentsCss/Header.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.header-container {
background-color: var(--background-black);
color: var(--main-green);
font-family: "Cafe24Moyamoya-Regular-v1.0", sans-serif;
display: flex;
align-items: center;
justify-content: space-between;
padding: 1rem;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header-title {
font-size: 1.25rem;
font-weight: bold;
color: var(--main-green);
}

.icon-button {
background: none;
border: none;
cursor: pointer;
padding: 0;
}

.icon-button svg {
color: var(--main-green);
}
2 changes: 2 additions & 0 deletions frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,5 @@ button:focus-visible {
background-color: #f9f9f9;
}
}


8 changes: 6 additions & 2 deletions frontend/src/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ import { createRoot } from "react-dom/client";
import "./index.css";
import App from "./App.jsx";
import "./assets/root.css";
import { BrowserRouter } from 'react-router-dom';

createRoot(document.getElementById("root")).render(
<StrictMode>
/*<StrictMode>
<App />
</StrictMode>
</StrictMode>*/
<BrowserRouter>
<App />
</BrowserRouter>
);
Loading