Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ Feat ] Group Ranking 퍼블리싱 #104

Merged
merged 19 commits into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from 12 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
18 changes: 18 additions & 0 deletions src/api/group/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,21 @@ export interface GroupJoinResponse {
description: string;
owner: string;
}

export interface GroupInfoResponse {
id: number;
name: string;
startDate: string;
endDate: string;
introduction: string;
groupImage: string;
isOwner: boolean;
ownerNickname: string;
}

export interface GroupRankingResponse {
userNickname: string;
profileImage: string;
rank: number;
solvedCount: number;
}
7 changes: 7 additions & 0 deletions src/api/user/type.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export type UserResponse = {
email?: string;
nickname?: string;
profileImage?: string;
bjNickname?: string;
desc?: string;
};
10 changes: 9 additions & 1 deletion src/app/group/my-solved/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import Sidebar from "@/common/component/Sidebar";
import { sidebarWrapper } from "@/styles/shared.css";

const MySolvedPage = () => {
return <div>MySolvedPage</div>;
return (
<div className={sidebarWrapper}>
<Sidebar />
{/* children */}
</div>
);
};

export default MySolvedPage;
66 changes: 24 additions & 42 deletions src/app/group/page.tsx
Original file line number Diff line number Diff line change
@@ -1,49 +1,31 @@
"use client";
import type { GroupInfoResponse } from "@/api/group/type";
import Sidebar from "@/common/component/Sidebar";
import { mainWrapper, sidebarWrapper } from "@/styles/shared.css";
import GroupSidebar from "@/view/group/dashboard/component/GroupSidebar";
import Ranking from "@/view/group/dashboard/component/Ranking";

import { IcnPlus, IcnSearch, IcnSquare } from "@/asset/svg";
import TabGroup from "@/common/component/Tab";
export const tmpGroupData: GroupInfoResponse = {
id: 0,
name: "숭실대학교 알고리즘 스터디",
startDate: "2024.08.13",
endDate: "2024.09.13",
introduction:
"BE Developer로 성장하고 싶은 숭실대학교 학생들이 푸는 알고리즘 스터디입니다",
groupImage: "",
isOwner: true,
ownerNickname: "jnary",
};

const GroupDashboardPage = () => {
return (
<TabGroup.Tabs
tag="main"
style={{ width: "100%", height: "calc(100vh - 7.2rem)" }}
>
<TabGroup.TabList>
<TabGroup.Tab
renderedIcon={(className: string) => (
<IcnSquare className={className} width={24} height={24} />
)}
tabId="1"
mode="fill"
>
대시보드
</TabGroup.Tab>
<TabGroup.Tab
renderedIcon={(className: string) => (
<IcnPlus className={className} width={16} height={16} />
)}
tabId="2"
mode="stroke"
>
문제 리스트
</TabGroup.Tab>
<TabGroup.Tab
renderedIcon={(className: string) => (
<IcnSearch className={className} width={18.2} height={18.2} />
)}
tabId="3"
mode="stroke"
>
스터디 관리
</TabGroup.Tab>
</TabGroup.TabList>
<TabGroup.TabPanels>
<div>1번 패널</div>
<div>2번 패널</div>
<div>3번 패널</div>
</TabGroup.TabPanels>
</TabGroup.Tabs>
<div className={sidebarWrapper}>
<Sidebar>
<GroupSidebar info={tmpGroupData} />
</Sidebar>
<section className={mainWrapper}>
<Ranking />
</section>
</div>
);
};

Expand Down
15 changes: 15 additions & 0 deletions src/app/group/problem-list/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import Sidebar from "@/common/component/Sidebar";
import { sidebarWrapper } from "@/styles/shared.css";
import ProblemSidebar from "@/view/group/index/component/ProblemSidebar";

const ProblemListPage = () => {
const isOwner = true;
return (
<div className={sidebarWrapper}>
<Sidebar>{isOwner ? <ProblemSidebar /> : <></>}</Sidebar>
{/* children */}
</div>
);
};

export default ProblemListPage;
10 changes: 9 additions & 1 deletion src/app/group/setting/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import Sidebar from "@/common/component/Sidebar";
import { sidebarWrapper } from "@/styles/shared.css";

const GroupSettingPage = () => {
return <div>GroupSettingPage</div>;
return (
<div className={sidebarWrapper}>
<Sidebar />
{/* children */}
</div>
);
};

export default GroupSettingPage;
5 changes: 0 additions & 5 deletions src/app/group/solved-list/page.tsx

This file was deleted.

15 changes: 15 additions & 0 deletions src/app/user/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import "@/styles/globalStyles.css";
import type { Metadata } from "next";

export const metadata: Metadata = {
title: "AlgoHub 마이페이지",
description: "특정 유저가 참여한 그룹 리스트를 볼 수 있는 페이지",
};

export default function UserLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return <>{children}</>;
}
16 changes: 15 additions & 1 deletion src/app/user/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
import Sidebar from "@/common/component/Sidebar";
import { mainWrapper, sidebarWrapper } from "@/styles/shared.css";
import UserCard from "@/view/user/index/component/UserCard";
import { userCardWrapper } from "@/view/user/index/component/UserCard/index.css";

const UserDashboardPage = () => {
return <div>UserDashboardPage</div>;
return (
<div className={sidebarWrapper}>
<Sidebar>
<div className={userCardWrapper}>
<UserCard />
</div>
</Sidebar>
<section className={mainWrapper}>{/**children */}</section>
</div>
);
};

export default UserDashboardPage;
15 changes: 15 additions & 0 deletions src/app/user/setting/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import "@/styles/globalStyles.css";
import type { Metadata } from "next";

export const metadata: Metadata = {
title: "AlgoHub 마이페이지 - 설정",
description: "유저의 정보 및 시스템을 설정할 수 있는 페이지",
};

export default function UserLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return <>{children}</>;
}
17 changes: 16 additions & 1 deletion src/app/user/setting/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
"use client";
import Sidebar from "@/common/component/Sidebar";
import { sidebarWrapper } from "@/styles/shared.css";
import SettingStep from "@/view/user/setting/component/SettingStep";
import type { SettingSteps } from "@/view/user/setting/type";
import { useState } from "react";

const UserSettingPage = () => {
return <div>UserSettingPage</div>;
const [step, setStep] = useState<SettingSteps>("my-profile");
return (
<div className={sidebarWrapper}>
<Sidebar>
<SettingStep step={step} setStep={setStep} />
</Sidebar>
{/* children */}
</div>
);
};

export default UserSettingPage;
Binary file added src/asset/img/gray_small_icon.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: 2 additions & 2 deletions src/asset/svg/icn_alarm.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions src/asset/svg/icn_mini_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/asset/svg/icn_pencil.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading