Skip to content

Commit

Permalink
delete: middleware settings
Browse files Browse the repository at this point in the history
  • Loading branch information
moolmin committed Oct 4, 2024
1 parent 690b7ac commit a8d5da9
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 45 deletions.
25 changes: 8 additions & 17 deletions next-sitemap.config.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
/** @type {import('next-sitemap').IConfig} */

module.exports = {
siteUrl: 'https://qqqq.world', // .게시하는 site의 url
generateRobotsTxt: true, // robots.txt generate 여부 (자동생성 여부)
sitemapSize: 7000, // sitemap별 최대 크기 (최대 크기가 넘어갈 경우 복수개의 sitemap으로 분리됨)
changefreq: 'daily', // 페이지 주소 변경 빈도 (검색엔진에 제공됨) - always, daily, hourly, monthly, never, weekly, yearly 중 택 1
priority: 1, // 페이지 주소 우선순위 (검색엔진에 제공됨, 우선순위가 높은 순서대로 크롤링함)
exclude: [
'/exclude/review', // 페이지 주소 하나만 제외시키는 경우
'/exclude/**', // 하위 주소 전체를 제외시키는 경우
], // sitemap 등록 제외 페이지 주소
siteUrl: 'https://qqqq.world',
generateRobotsTxt: true,
sitemapSize: 7000,
changefreq: 'daily',
priority: 1,
robotsTxtOptions: {
// 정책 설정
policies: [
{
userAgent: '*', // 모든 agent 허용
allow: '/', // 모든 페이지 주소 크롤링 허용
disallow: [
'/exclude', // exclude로 시작하는 페이지 주소 크롤링 금지
]
userAgent: '*',
allow: '/',
},
// 추가 정책이 필요할 경우 배열 요소로 추가 작성
]
} // robots.txt 옵션 설정
}
}
5 changes: 2 additions & 3 deletions next.config.js → next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ const nextConfig = withAntdLess({
{
protocol: 'https',
hostname: 'chunsik-dev.s3.ap-northeast-2.amazonaws.com',
port: '', // Leave empty if it's the default port (443 for https)
pathname: '/**', // Match all paths under the hostname
port: '',
pathname: '/**',
},
],
},
Expand All @@ -35,7 +35,6 @@ const nextConfig = withAntdLess({
},
});

// Sentry configuration
const sentryConfig = {
org: "chulchulhanchunsigi",
project: "pq-fe",
Expand Down
26 changes: 14 additions & 12 deletions src/app/(pages)/4q-gallery/_components/item-card.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
"use client";

import React, { useState, useEffect } from "react";
import React, { useState } from "react";
import styles from "./item-card.module.css";
import Heart from "@react-sandbox/heart";
import Detail from "./detail";
import { Drawer, theme, message, Skeleton } from "antd";
import { Drawer, theme, message } from "antd";
import { IoMdHeart } from "react-icons/io";
import { IoPerson } from "react-icons/io5";
import { likeImage, unlikeImage } from "@/service/photo_api";
import Lottie from "react-lottie-player";
import heartLottie from "../../../../../public/rotties/heart-lottie.json";
import Lottie from 'react-lottie-player';
import heartLottie from '../../../../../public/rotties/heart-lottie.json';
import Image from "next/image";

type Item = {
Expand All @@ -33,7 +33,6 @@ export default function ItemCard({ item }: ItemCardProps) {
const [active, setActive] = useState(item.liked);
const [likeCount, setLikeCount] = useState(item.likeCount);
const [playLottie, setPlayLottie] = useState(false);
const [imageLoaded, setImageLoaded] = useState(false);

const showDrawer = () => {
setOpen(true);
Expand All @@ -45,7 +44,7 @@ export default function ItemCard({ item }: ItemCardProps) {
};

const clickHeart = async () => {
const accessToken = sessionStorage.getItem("AccessToken");
const accessToken = sessionStorage.getItem('AccessToken');

if (!accessToken) {
message.error("로그인이 필요한 기능입니다.");
Expand All @@ -68,7 +67,7 @@ export default function ItemCard({ item }: ItemCardProps) {
setPlayLottie(true);
setTimeout(() => {
setPlayLottie(false);
}, 1000);
}, 1000);
}
}
} catch (error) {
Expand All @@ -90,24 +89,27 @@ export default function ItemCard({ item }: ItemCardProps) {
</div>
)}
<div className={styles.heartCircle}>
<Heart width={25} height={25} active={active} onClick={clickHeart} />
<Heart
width={25}
height={25}
active={active}
onClick={clickHeart}
/>
</div>
<div className={styles.imgContainer}>
{!imageLoaded && <Skeleton.Image active={active} style={{ width: '100%', height: '100%' }} />}
<Image
width={200}
height={200}
src={item.url}
alt="photo QR"
onClick={showDrawer}
onLoadingComplete={() => setImageLoaded(true)}
/>
</div>
</div>
<div className={styles.bottomContainer}>
<div className={styles.author}>
<IoPerson />
<span>{item.userName ? item.userName : "비로그인 회원"}</span>
<span>{item.userName ? item.userName : '비로그인 회원'}</span>
</div>
<div className={styles.heartCount}>
<IoMdHeart />
Expand All @@ -121,7 +123,7 @@ export default function ItemCard({ item }: ItemCardProps) {
onClose={onClose}
open={open}
height="97%"
getContainer={document.body}
getContainer={document.body}
className={styles.drawerContainer}
>
<div className={styles.detailContainer}>
Expand Down
13 changes: 0 additions & 13 deletions src/middleware.js

This file was deleted.

0 comments on commit a8d5da9

Please sign in to comment.