Skip to content

Commit

Permalink
fix: prettier 수정 (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
ksmfou98 authored Oct 18, 2023
1 parent 0355aa8 commit a78ee5a
Show file tree
Hide file tree
Showing 253 changed files with 3,241 additions and 2,089 deletions.
2 changes: 1 addition & 1 deletion apps/jurumarble/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
extends: ["mogakko/next"],
extends: ['mogakko/next'],
root: true,
};
36 changes: 18 additions & 18 deletions apps/jurumarble/next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
console.log("START");
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
console.log('START');
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});

/** @type {import('next').NextConfig} */
Expand All @@ -9,24 +9,24 @@ const nextConfig = {
compiler: {
styledComponents: true,
},
transpilePackages: ["@monorepo/ui, @monorepo/hooks"],
transpilePackages: ['@monorepo/ui, @monorepo/hooks'],
images: {
unoptimized: true,
domains: [
"shopping-phinf.pstatic.net",
"elasticbeanstalk-ap-northeast-2-319210348301.s3.ap-northeast-2.amazonaws.com",
"tong.visitkorea.or.kr",
"img.danawa.com",
"sulsulsul.com",
"shop-phinf.pstatic.net",
"modo-phinf.pstatic.net",
"cdn-pro-web-251-115.cdn-nhncommerce.com",
"lh3.googleusercontent.com",
"cdn-std-web-220-13.cdn-nhncommerce.com",
"cdn.imweb.me",
"www.xn--2q1bq25atga3iu9cz95a.com",
"www.seenews365.com",
"www.seongpo.co.kr",
'shopping-phinf.pstatic.net',
'elasticbeanstalk-ap-northeast-2-319210348301.s3.ap-northeast-2.amazonaws.com',
'tong.visitkorea.or.kr',
'img.danawa.com',
'sulsulsul.com',
'shop-phinf.pstatic.net',
'modo-phinf.pstatic.net',
'cdn-pro-web-251-115.cdn-nhncommerce.com',
'lh3.googleusercontent.com',
'cdn-std-web-220-13.cdn-nhncommerce.com',
'cdn.imweb.me',
'www.xn--2q1bq25atga3iu9cz95a.com',
'www.seenews365.com',
'www.seongpo.co.kr',
],
},
};
Expand Down
4 changes: 3 additions & 1 deletion apps/jurumarble/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"gen:icon": "yarn gen --out-dir ./src/assets/icons/components ./src/assets/icons",
"icon:build": "yarn gen:icon",
"eslint": "eslint -c .eslintrc.js .",
"eslint:fix": "yarn eslint --fix"
"eslint:fix": "yarn eslint --fix",
"prettier": "prettier --config ../../packages/prettier-config/index.json --ignore-path ../../.prettierignore --check './**/*.{js,ts,tsx,md}'",
"prettier:fix": "yarn prettier --write"
},
"dependencies": {
"@emotion/is-prop-valid": "^1.2.1",
Expand Down
22 changes: 11 additions & 11 deletions apps/jurumarble/public/images/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export { default as EmptyAImg } from "./AImg.png";
export { default as ExImg1 } from "./exe1.png";
export { default as ExImg2 } from "./exe2.png";
export { default as DrinkImage } from "./DrinkImage.png";
export { default as MainBannerImage } from "./MainBannerImage.png";
export { default as Male } from "./male.png";
export { default as Female } from "./female.png";
export { default as DrinkCapacityLow } from "./DrinkCapacityLow.png";
export { default as DrinkCapacityMedium } from "./DrinkCapacityMedium.png";
export { default as DrinkCapacityHigh } from "./DrinkCapacityHigh.png";
export { default as ImgScroll } from "./ImgScroll.png";
export { default as EmptyAImg } from './AImg.png';
export { default as ExImg1 } from './exe1.png';
export { default as ExImg2 } from './exe2.png';
export { default as DrinkImage } from './DrinkImage.png';
export { default as MainBannerImage } from './MainBannerImage.png';
export { default as Male } from './male.png';
export { default as Female } from './female.png';
export { default as DrinkCapacityLow } from './DrinkCapacityLow.png';
export { default as DrinkCapacityMedium } from './DrinkCapacityMedium.png';
export { default as DrinkCapacityHigh } from './DrinkCapacityHigh.png';
export { default as ImgScroll } from './ImgScroll.png';
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
import { useState } from "react";
import { useState } from 'react';

import { useQueryClient } from "@tanstack/react-query";
import Comment from "app/vote/[id]/components/Comment";
import CommentForm from "app/vote/[id]/components/CommentForm";
import CommentToolBar from "app/vote/[id]/components/CommentToolbar";
import useCommentServices from "app/vote/[id]/services/useCommentServices";
import { queryKeys } from "lib/queryKeys";
import { useParams } from "next/navigation";
import styled from "styled-components";
import { useQueryClient } from '@tanstack/react-query';
import Comment from 'app/vote/[id]/components/Comment';
import CommentForm from 'app/vote/[id]/components/CommentForm';
import CommentToolBar from 'app/vote/[id]/components/CommentToolbar';
import useCommentServices from 'app/vote/[id]/services/useCommentServices';
import { queryKeys } from 'lib/queryKeys';
import { useParams } from 'next/navigation';
import styled from 'styled-components';

function DrinkCommentContainer() {
const params = useParams();
const postId = params.id;
const queryClient = useQueryClient();
const [sortBy, setSortBy] = useState<"ByTime" | "ByPopularity">("ByTime");
const onChangeFilter = (sort: "ByTime" | "ByPopularity") => {
const [sortBy, setSortBy] = useState<'ByTime' | 'ByPopularity'>('ByTime');
const onChangeFilter = (sort: 'ByTime' | 'ByPopularity') => {
setSortBy(sort);
};

// const { commentFilter, onChangeCommentFilter } = useCommentFilter();
const { comments, isError, isLoading, mutateHate, mutateLike, mutateComment } =
useCommentServices(Number(postId), sortBy, "drinks");
const {
comments,
isError,
isLoading,
mutateHate,
mutateLike,
mutateComment,
} = useCommentServices(Number(postId), sortBy, 'drinks');

const [commentForm, setCommentForm] = useState("");
const [commentForm, setCommentForm] = useState('');
const onChangeCommentForm = (e: React.ChangeEvent<HTMLInputElement>) => {
setCommentForm(e.target.value);
};
Expand All @@ -35,14 +41,18 @@ function DrinkCommentContainer() {
{
onSuccess: () => {
queryClient.invalidateQueries([queryKeys.DETAIL_COMMENT_LIST]);
setCommentForm("");
setCommentForm('');
},
},
);
};

if (isError) {return <div>에러</div>;}
if (!comments) {return <div>데이터 없음</div>;}
if (isError) {
return <div>에러</div>;
}
if (!comments) {
return <div>데이터 없음</div>;
}

const commentList = comments.pages.flatMap((page) => page.content);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import Chip from "components/Chip";
import Loading from "components/Loading";
import VoteHeader from "components/VoteHeader";
import { Button } from "components/button";
import Image from "next/image";
import { useParams, useRouter } from "next/navigation";
import useDrinkStampService from "services/useDrinkStampService";
import { SvgHeaderSearch, SvgIcPrevious, SvgStamp } from "src/assets/icons/components";
import styled, { css, useTheme } from "styled-components";

import useDrinkLoadService from "../services/useDrinkLoadService";
import Chip from 'components/Chip';
import Loading from 'components/Loading';
import VoteHeader from 'components/VoteHeader';
import { Button } from 'components/button';
import Image from 'next/image';
import { useParams, useRouter } from 'next/navigation';
import useDrinkStampService from 'services/useDrinkStampService';
import {
SvgHeaderSearch,
SvgIcPrevious,
SvgStamp,
} from 'src/assets/icons/components';
import styled, { css, useTheme } from 'styled-components';

import useDrinkLoadService from '../services/useDrinkLoadService';

const DrinkInfoContainer = () => {
const router = useRouter();
Expand Down Expand Up @@ -71,17 +75,19 @@ const DrinkInfoContainer = () => {
width={370}
height={320}
style={{
width: "100%",
height: "100%",
objectFit: "cover",
width: '100%',
height: '100%',
objectFit: 'cover',
}}
/>
</ImageWrapper>
<Container>
<FlexBetweenRow>
<FlexRow>
<Chip variant="region">{manufactureAddress.slice(0, 2)}</Chip>
<Chip variant="numberOfParticipants">{enjoyCount}명이 즐겼어요</Chip>
<Chip variant="numberOfParticipants">
{enjoyCount}명이 즐겼어요
</Chip>
</FlexRow>
<SvgStamp
onClick={() => postDrinkEnjoy(Number(id))}
Expand Down
12 changes: 8 additions & 4 deletions apps/jurumarble/src/app/drink-info/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
"use client";
'use client';

import dynamic from "next/dynamic";
import dynamic from 'next/dynamic';

const DynamicDrinkInfoContainer = dynamic(() => import("./components/DrinkInfoContainer"));
const DynamicDrinkCommentContainer = dynamic(() => import("./components/DrinkCommentContainer"));
const DynamicDrinkInfoContainer = dynamic(
() => import('./components/DrinkInfoContainer'),
);
const DynamicDrinkCommentContainer = dynamic(
() => import('./components/DrinkCommentContainer'),
);

function DrinkInfoPage() {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useQuery } from "@tanstack/react-query";
import { getDrinkInfo } from "lib/apis/drink";
import { reactQueryKeys } from "lib/queryKeys";
import { useQuery } from '@tanstack/react-query';
import { getDrinkInfo } from 'lib/apis/drink';
import { reactQueryKeys } from 'lib/queryKeys';

export default function useDrinkLoadService(id: number) {
const { data, isLoading, isError } = useQuery(
Expand Down
44 changes: 26 additions & 18 deletions apps/jurumarble/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
import type { Metadata } from "next";
import type { Metadata } from 'next';

import AuthProcess from "components/AuthProcess";
import { PageLayout } from "components/layouts";
import ReactQueryProvider from "lib/ReactQueryProvider";
import { pretandard } from "lib/localFont";
import StyledComponents from "lib/styles/StyledComponents";
import { ToastContainer } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";
import { injectStyle } from "react-toastify/dist/inject-style";
import "swiper/css";
import "swiper/css/navigation";
import "swiper/css/pagination";
import "lib/styles/global.css";
import AuthProcess from 'components/AuthProcess';
import { PageLayout } from 'components/layouts';
import ReactQueryProvider from 'lib/ReactQueryProvider';
import { pretandard } from 'lib/localFont';
import StyledComponents from 'lib/styles/StyledComponents';
import { ToastContainer } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css';
import { injectStyle } from 'react-toastify/dist/inject-style';
import 'swiper/css';
import 'swiper/css/navigation';
import 'swiper/css/pagination';
import 'lib/styles/global.css';

export const metadata: Metadata = {
title: "주루마블",
description: "주루마블",
title: '주루마블',
description: '주루마블',
};

if (typeof window !== "undefined") {
if (typeof window !== 'undefined') {
injectStyle();
}

export default function RootLayout({ children }: { children: React.ReactNode }) {
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="kr">
<head />
Expand All @@ -33,7 +37,11 @@ export default function RootLayout({ children }: { children: React.ReactNode })
<div id="portal" />
<AuthProcess />
{children}
<ToastContainer position="top-center" autoClose={2000} hideProgressBar />
<ToastContainer
position="top-center"
autoClose={2000}
hideProgressBar
/>
</PageLayout>
</StyledComponents>
</ReactQueryProvider>
Expand Down
10 changes: 5 additions & 5 deletions apps/jurumarble/src/app/login/components/LoginPageHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import VoteHeader from "components/VoteHeader";
import { Button } from "components/button";
import { useRouter } from "next/navigation";
import { SvgIcPrevious } from "src/assets/icons/components";
import styled, { css } from "styled-components";
import VoteHeader from 'components/VoteHeader';
import { Button } from 'components/button';
import { useRouter } from 'next/navigation';
import { SvgIcPrevious } from 'src/assets/icons/components';
import styled, { css } from 'styled-components';

function LoginPageHeader() {
const router = useRouter();
Expand Down
16 changes: 10 additions & 6 deletions apps/jurumarble/src/app/login/components/LoginSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ import {
KAKAO_LOGIN_REDIRECT_URL,
NAVER_CLIENT_ID,
NAVER_LOGIN_REDIRECT_URL,
} from "lib/constants";
import { transitions } from "lib/styles";
import Link from "next/link";
import { SvgIcThunder, SvgKakaoIcon, SvgNaverIcon } from "src/assets/icons/components";
import styled, { css } from "styled-components";
} from 'lib/constants';
import { transitions } from 'lib/styles';
import Link from 'next/link';
import {
SvgIcThunder,
SvgKakaoIcon,
SvgNaverIcon,
} from 'src/assets/icons/components';
import styled, { css } from 'styled-components';

const socialLoginLink = {
KAKAO: `https://kauth.kakao.com/oauth/authorize?client_id=${KAKAO_CLIENT_ID}&redirect_uri=${KAKAO_LOGIN_REDIRECT_URL}&response_type=code`,
Expand Down Expand Up @@ -58,7 +62,7 @@ const BalloonText = styled.div`
animation: ${transitions.delaypopInFromBottom} 1.2s ease-in-out;
::after {
content: "";
content: '';
position: absolute;
top: 100%;
left: 47%;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { transitions } from "lib/styles";
import styled, { css } from "styled-components";
import { transitions } from 'lib/styles';
import styled, { css } from 'styled-components';

function TermsOfUseSection() {
return (
Expand All @@ -9,7 +9,8 @@ function TermsOfUseSection() {
<br />
계속하면 당사의 <ClickText>서비스 약관</ClickText>에 동의하고,
<br />
<ClickText>개인정보 보호정책</ClickText>을(를) 읽어 당사의 데이터 수집, 사용,
<ClickText>개인정보 보호정책</ClickText>을(를) 읽어 당사의 데이터 수집,
사용,
<br />
공유 방법을 확인했음을 인정하는 것입니다.
</TermsOfUse>
Expand Down
10 changes: 5 additions & 5 deletions apps/jurumarble/src/app/login/components/WelcomeSection.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { transitions } from "lib/styles";
import Image from "next/image";
import { DrinkImage } from "public/images";
import { SvgLogo } from "src/assets/icons/components";
import styled, { css } from "styled-components";
import { transitions } from 'lib/styles';
import Image from 'next/image';
import { DrinkImage } from 'public/images';
import { SvgLogo } from 'src/assets/icons/components';
import styled, { css } from 'styled-components';

function WelcomeSection() {
return (
Expand Down
Loading

0 comments on commit a78ee5a

Please sign in to comment.