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/#93 nayeon qa #116

Merged
merged 17 commits into from
Jul 22, 2022
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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
},
"dependencies": {
"axios": "^0.26.0",
"qs": "^6.11.0",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-range": "^1.8.13",
Expand Down
Binary file modified public/favicon.ico
Binary file not shown.
12 changes: 5 additions & 7 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
<html lang="ko">
<head>
<meta charset="utf-8" />
<!-- <link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> -->
<link rel="icon" href="www.piickle.link" />
<link rel="favicon" href="../src/asset/image/favicon-96x96.png" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="favicon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
Expand All @@ -20,18 +19,17 @@

<!-- 구글 사이트 등록 -->
<!-- <meta name="google-site-verification" content="0RPXb4zNEZ0EqIyVxmEuJIgNVg46GEQ4ej-o8RQIf4A" /> -->
<!-- 네이버 사이트 등록 -->
<!-- <meta name="naver-site-verification" content="0fb581e72c635a438e442262152cd8a5318886a4" /> -->
<meta name="naver-site-verification" content="9a8c5ca76d6e313ad212de30ccc608c95ebf17b7" />

<meta property="og:type" content="website" />
<meta property="og:url" content="www.piickle.link" />
<meta property="og:title" content="내게 필요한 대화주제 추천, Piickle" />
<meta property="og:description" content="대화주제 추천, Piickle" />
<meta property="og:image" content="" />
<meta property="og:image" content="https://piiklebucket11.s3.ap-northeast-2.amazonaws.com/mainbanner01.jpg" />
<meta property="twitter:card" content="summary">
<meta property="twitter:title" content="내게 필요한 대화주제 추천, Piickle">
<meta property="twitter:description" content="대화주제 추천, Piickle">
<meta property="twitter:image" content="">
<meta property="twitter:image" content="https://piiklebucket11.s3.ap-northeast-2.amazonaws.com/mainbanner01.jpg">

<link rel="canonical" href="www.piickle.link"/>

Expand Down
Binary file added src/asset/image/banner_1.jpg
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 src/asset/image/banner_2.jpg
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 src/asset/image/banner_3.jpg
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 src/asset/image/banner_4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/asset/image/favicon-96x96.png
Binary file not shown.
6 changes: 4 additions & 2 deletions src/asset/image/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export { default as ImgBanner1 } from "./banner_1.jpg";
export { default as ImgBanner2 } from "./banner_2.jpg";
export { default as ImgBanner3 } from "./banner_3.jpg";
export { default as ImgBanner4 } from "./banner_4.jpg";
export { default as ImgCategoryBanner } from "./categoryBanner.png";
export { default as ImgDefaultProfile } from "./defaultProfile.png";
export { default as ImgBanner1 } from "./mainbanner01.jpg";
export { default as ImgBanner2 } from "./mainbanner02.jpg";
export { default as ImgPiickleLoading } from "./piickleLoading.gif";
Binary file removed src/asset/image/mainbanner01.jpg
Binary file not shown.
Binary file removed src/asset/image/mainbanner02.jpg
Binary file not shown.
2 changes: 1 addition & 1 deletion src/components/CardCollection/Card/LastCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function LastCard() {
나누셨나요?
</St.ContentTitle>
<St.Content>
오른쪽에서 왼쪽으로 스와이핑 해서
화살표를 터치해서
<br />
새로운 대화 주제를 둘러보세요
</St.Content>
Expand Down
13 changes: 12 additions & 1 deletion src/components/CardCollection/FilterModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,19 @@ export default function FilterModal(props: FilterModalProps) {
});
closeHandler();

// 남 -> 남자, 여 -> 여자
const tempCheckedTags = new Set([...checkedTags]);
if (tempCheckedTags.has("남")) {
tempCheckedTags.delete("남");
tempCheckedTags.add("남자");
}
if (tempCheckedTags.has("여")) {
tempCheckedTags.delete("여");
tempCheckedTags.add("여자");
}

// 태그 정보 저장
const _checkedTagsArr = [...checkedTags];
const _checkedTagsArr = [...tempCheckedTags];
_checkedTagsArr.push(intimacyTags[intimacyValues[0]]);
setFilterTags({ tags: _checkedTagsArr, intimacy: [intimacyValues[0]], isActive: true });

Expand Down
26 changes: 18 additions & 8 deletions src/components/Main/Banner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,29 @@ import "slick-carousel/slick/slick-theme.css";
import { useState } from "react";
import Slider from "react-slick";

import { ImgBanner1, ImgBanner2 } from "../../../asset/image";
import { ImgBanner1, ImgBanner2, ImgBanner3, ImgBanner4 } from "../../../asset/image";
import { St } from "./style";

type BannerImage = {
src: string;
alt: string;
};
const BannerImage: BannerImage[] = [
const bannerImage: BannerImage[] = [
{
src: "https://piiklebucket11.s3.ap-northeast-2.amazonaws.com/mainbanner01.jpg",
alt: "피클 소개 이미지",
src: ImgBanner1,
alt: "지금 내게 필요한 대화주제 추천 서비스 피클 시작하기",
},
{
src: "https://piiklebucket11.s3.ap-northeast-2.amazonaws.com/mainbanner02.jpg",
alt: "피클 소개 이미지",
src: ImgBanner2,
alt: "헬로우 피클 피플",
},
{
src: ImgBanner3,
alt: "무드 피클",
},
{
src: ImgBanner4,
alt: "렛츠 피클",
},
];

Expand All @@ -39,13 +47,15 @@ export default function Banner() {
return (
<St.BannerSlider>
<Slider {...settings}>
{BannerImage.map((img, index) => (
{bannerImage.map((img, index) => (
<St.ImageWrapper key={index} src={img.src} alt={img.alt} />
))}
</Slider>

<St.ContentsPages>
<St.CurrentPage>{currentSlide + 1} / 2</St.CurrentPage>
<St.CurrentPage>
{currentSlide + 1} / {bannerImage.length}
</St.CurrentPage>
</St.ContentsPages>
</St.BannerSlider>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/MyPage/MyInfo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function MyInfo() {

const selectedImg = e.target.files[0];
const formData = new FormData();
formData.append("img", selectedImg);
formData.append("file", selectedImg);
console.log(formData);

handlePatch(formData);
Expand Down
8 changes: 4 additions & 4 deletions src/components/common/Footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import React, { ReactElement } from "react";

import { St } from "./style";

Expand All @@ -8,7 +8,7 @@ export default function Footer() {

type serviceInfo = {
title: string;
detail: string;
detail: string | ReactElement;
};

const ServiceInfo: serviceInfo[] = [
Expand All @@ -18,11 +18,11 @@ export default function Footer() {
},
{
title: "Info",
detail: "공식 노션 바로가기",
detail: <a href="https://www.notion.so/piickle-a44992440f3b4e808a175f7fc1a4fe25">공식 노션 바로가기</a>,
},
{
title: "Instagram",
detail: "piickle_official",
detail: <a href="https://www.instagram.com/piickle_official/">@piickle_official</a>,
},
];

Expand Down
2 changes: 0 additions & 2 deletions src/components/common/Loading/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ImgPiickleLoading } from "../../../asset/image";
import Header from "../Header";
import { St } from "./style";

interface LoadingProps {
Expand All @@ -11,7 +10,6 @@ export default function Loading(props: LoadingProps) {

return (
<St.Root backgroundcolor={backgroundColor}>
<Header />
<St.ImageWrapper>
<img src={ImgPiickleLoading} alt="피클 로딩" />
</St.ImageWrapper>
Expand Down
15 changes: 9 additions & 6 deletions src/core/api/cardCollection.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import qs from "qs";

import { realReq } from "./common/axios";
import { PATH } from "./common/constants";

Expand All @@ -13,13 +15,14 @@ function fetchCardsWithBest<T>() {

// 필터로 카드 리스트 조회
function fetchCardsWithFilter<T>(types: string[]) {
let params = "?search=태그";

types.forEach((type) => {
params += `&search=${type}`;
});
const searchParams = qs.stringify(
{
search: types.length === 0 ? ["태그"] : types,
},
{ arrayFormat: "repeat" },
);

return realReq.GET<T>(`${PATH.CATEGORIES}/cards${params}`);
return realReq.GET<T>(`${PATH.CATEGORIES}/cards?${searchParams}`);
}

// 북마크 생성
Expand Down
4 changes: 2 additions & 2 deletions src/core/api/common/axios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export const realReq = {
return real.get(path);
},

async GET<T>(path: string) {
const data = await real.get<T>(path);
async GET<T>(path: string, option?: { params: string }) {
const data = await real.get<T>(path, option);
return data.data;
},

Expand Down
2 changes: 2 additions & 0 deletions src/style/globalStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ export const GlobalStyle = createGlobalStyle`
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
font-family: sans-serif;
font-size: 62.5%;
user-select: none;
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12275,7 +12275,7 @@ qs@6.10.3:
dependencies:
side-channel "^1.0.4"

qs@^6.10.0:
qs@^6.10.0, qs@^6.11.0:
version "6.11.0"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a"
integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==
Expand Down