Skip to content

Commit

Permalink
๐Ÿ’„ ์ปจํ…Œ์ด๋„ˆ ๋ชฉ๋ก UI ์ˆ˜์ •
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanghyeondong committed Sep 13, 2024
1 parent 1077bee commit 34d7971
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/app/(main)/container/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function Home() {
const [filterOption, setFilterOption] = useState("");

const titles = {
recent: "์ตœ๊ทผ ์‹คํ–‰ ์ปจํ…Œ์ด๋„ˆ",
// recent: "์ตœ๊ทผ ์‹คํ–‰ ์ปจํ…Œ์ด๋„ˆ",
semester: "์ด๋ฒˆ ํ•™๊ธฐ ์ปจํ…Œ์ด๋„ˆ",
all: "์ „์ฒด ํ•™๊ธฐ ์ปจํ…Œ์ด๋„ˆ",
};
Expand Down
4 changes: 2 additions & 2 deletions src/app/(main)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ export default function Layout({ children }: LayoutProps) {
<div>์ „์ฒด ํ•™๊ธฐ ์ปจํ…Œ์ด๋„ˆ</div>
</div>
</Link>
<Link href="/container/recent">
{/* <Link href="/container/recent">
<div
className={`${styles.menuItem} ${isActive(
"/container/recent"
)}`}
>
<div>์ตœ๊ทผ ์‹คํ–‰ ์ปจํ…Œ์ด๋„ˆ</div>
</div>
</Link>
</Link> */}
<Link href="/container/semester">
<div
className={`${styles.menuItem} ${isActive(
Expand Down
16 changes: 11 additions & 5 deletions src/app/(main)/mypage/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@ import { useUserStore } from "@/store/userStore";
import styles from "./page.module.css";
import ProfilePic from "/public/icons/MyProfile.svg";
import { useRouter } from "next/navigation";
import { useFetchService } from "@/api/hooks/useStudent";
import { type ServiceSchema } from "@/type/schemas";

const MyPage = () => {
const router = useRouter();
const { name, role, studentId, email, logout } = useUserStore(
(state) => state
);

const { data: serviceData, isLoading, error } = useFetchService();
let numberOfElements = 0;
if (serviceData) serviceData.map(() => (numberOfElements++));

const handleLogout = () => {
logout();
Expand Down Expand Up @@ -54,15 +60,15 @@ const MyPage = () => {
</div>

<div className={styles.statisticsSection}>
<h2 className={styles.sectionTitle}>์ปจํ…Œ์ด๋„ˆ ์‚ฌ์šฉ์‹œ๊ฐ„ ํ†ต๊ณ„</h2>
<h2 className={styles.sectionTitle}>์ปจํ…Œ์ด๋„ˆ ์ •๋ณด</h2>
<div className={styles.statsItem}>
<span className={styles.statsLabel}>์ด ์‚ฌ์šฉ์‹œ๊ฐ„:</span>
<span className={styles.statsValue}>50์‹œ๊ฐ„</span>
<span className={styles.statsLabel}>์ด ์ปจํ…Œ์ด๋„ˆ ์ˆ˜:</span>
<span className={styles.statsValue}>{numberOfElements}</span>
</div>
<div className={styles.statsItem}>
{/* <div className={styles.statsItem}>
<span className={styles.statsLabel}>์ด๋ฒˆ ํ•™๊ธฐ ์‚ฌ์šฉ์‹œ๊ฐ„:</span>
<span className={styles.statsValue}>20์‹œ๊ฐ„</span>
</div>
</div> */}
</div>

<div className={styles.linkSection}>
Expand Down
13 changes: 10 additions & 3 deletions src/app/(professor)/professor-page/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@ import styles from "./page.module.css";
import ProfilePic from "/public/icons/MyProfile.svg";
import { useRouter } from "next/navigation";
import { useUserStore } from "@/store/userStore";
import { useFetchCheck } from "@/api/hooks/useProfessor";
import { type ServiceSchema } from "@/type/schemas";

const MyPage = () => {
const { name, role, studentId, email, logout } = useUserStore(
(state) => state
);

const { data: containerCheckData, isLoading, error } = useFetchCheck();
let numberOfElements = 0;
if (containerCheckData) containerCheckData.map(() => (numberOfElements++));

const router = useRouter();

const handleLogout = () => {
Expand Down Expand Up @@ -57,12 +64,12 @@ const MyPage = () => {
<h2 className={styles.sectionTitle}>์ปจํ…Œ์ด๋„ˆ ์ •๋ณด</h2>
<div className={styles.statsItem}>
<span className={styles.statsLabel}>์šด์˜์ค‘์ธ ์ปจํ…Œ์ด๋„ˆ ๊ฐœ์ˆ˜:</span>
<span className={styles.statsValue}>5๊ฐœ</span>
<span className={styles.statsValue}>{numberOfElements}</span>
</div>
<div className={styles.statsItem}>
{/* <div className={styles.statsItem}>
<span className={styles.statsLabel}>์‚ฌ์šฉ๋œ ์ปจํ…Œ์ด๋„ˆ ๊ฐœ์ˆ˜:</span>
<span className={styles.statsValue}>67๊ฐœ</span>
</div>
</div> */}
</div>

<div className={styles.linkSection}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/container/Filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default function Filter({ onSelect }: FilterProps) {
className={`${styles.filterOptions} ${isFilterOpen ? styles.open : ""}`}
>
<div onClick={() => handleSelect("์ „์ฒด ํ•™๊ธฐ")}>์ „์ฒด ํ•™๊ธฐ</div>
<div onClick={() => handleSelect("์ตœ๊ทผ ์‹คํ–‰")}>์ตœ๊ทผ ์‹คํ–‰</div>
{/* <div onClick={() => handleSelect("์ตœ๊ทผ ์‹คํ–‰")}>์ตœ๊ทผ ์‹คํ–‰</div> */}
<div onClick={() => handleSelect("์ด๋ฒˆ ํ•™๊ธฐ")}>์ด๋ฒˆ ํ•™๊ธฐ</div>
</div>
</div>
Expand Down

0 comments on commit 34d7971

Please sign in to comment.