Skip to content

Commit

Permalink
Feat(mypage) : 마이페이지
Browse files Browse the repository at this point in the history
- 피그마대로 UI완성
- 닉네임, 프로필 이미지, 자격증 변경가능
- Footer 모바일에도 나오게 변경
  • Loading branch information
godzz733 committed Aug 2, 2024
1 parent 73e6953 commit 16450b9
Show file tree
Hide file tree
Showing 28 changed files with 1,228 additions and 157 deletions.
12 changes: 12 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@ const nextConfig = {
port: "",
pathname: "/**",
},
{
protocol: "https",
hostname: "github.com",
port: "",
pathname: "/**",
},
{
protocol: "https",
hostname: "dkvmrny1lb9jp.cloudfront.net",
port: "",
pathname: "/**",
},
],
},
// svgr 설정
Expand Down
3 changes: 3 additions & 0 deletions public/icons/arrow-up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
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 public/icons/eye-closed-line.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions public/icons/eye-line.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions public/icons/facebook-line.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions public/icons/instagram-line.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 10 additions & 6 deletions src/api/apis/mainFetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@ interface Options<T> {
export const mainfetch = async <T>(
path: string,
options: Options<T>,
needLogin: boolean
needLogin: boolean,
contentType?: string
): Promise<Response> => {
const url = process.env.NEXT_PUBLIC_SERVER_URL + path;
const headers: HeadersInit = {
"Content-Type": "application/json",
};
const headers: HeadersInit = contentType
? {}
: {
"Content-Type": "application/json",
};

if (needLogin) {
const accessToken = localStorage.getItem("accessToken");
Expand All @@ -38,9 +41,10 @@ export const mainfetch = async <T>(
const fetchOptions: RequestInit = {
method: options.method,
headers,
body: options.body ? JSON.stringify(options.body) : null,
body: options.body
? ((contentType ? options.body : JSON.stringify(options.body)) as BodyInit)
: null,
};

let response = await fetch(url, fetchOptions);
if (response.status === 401 && needLogin) {
const newAccessToken = await refreshTokenInterceptor();
Expand Down
6 changes: 6 additions & 0 deletions src/api/types/userinfo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
interface UserInfo {
memberId: string;
nickname: string;
email: string;
profileImage: string;
}
5 changes: 1 addition & 4 deletions src/app/learning/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"use client";
import { MiddleBoxColumn } from "@/src/components/elements/styledElements";
import ScrollAppbar from "@/src/components/scrollAppbar";
import { useMediaQuery, useTheme } from "@mui/material";
import { useEffect, useState } from "react";
import LearningFooter from "../../components/Footer";
import MakeProblemSetUI from "./components/MakeProblemSet";
Expand All @@ -22,8 +21,6 @@ const makeProblemSetBase = () => {
const handleIsCertificate = () => {
setisCertificate(true);
};
const theme = useTheme();
const isMd = useMediaQuery(theme.breakpoints.down(960));

const handleScroll = () => {
setisScroll(window.scrollY);
Expand All @@ -48,7 +45,7 @@ const makeProblemSetBase = () => {
) : (
<SelectCertificate handleIsCertificate={handleIsCertificate} />
)}
{!isMd && <LearningFooter />}
<LearningFooter />
</MiddleBoxColumn>
);
};
Expand Down
Loading

0 comments on commit 16450b9

Please sign in to comment.