Skip to content

Commit

Permalink
Merge pull request #246 from TripInfoWeb/dev_informations
Browse files Browse the repository at this point in the history
Fix: 빌드 오류 수정
  • Loading branch information
HyunJinNo authored Aug 31, 2024
2 parents 732673b + bff9eb2 commit 1a70014
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 76 deletions.
19 changes: 19 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

108 changes: 53 additions & 55 deletions src/components/common/FloatingButton.tsx
Original file line number Diff line number Diff line change
@@ -1,79 +1,77 @@
import Image from "next/image";
import Link from "next/link";
import { forwardRef } from "react";
import { RefObject } from "react";
import { IoIosArrowUp } from "react-icons/io";
import { MdClose } from "react-icons/md";

interface Props {
visible: boolean;
ref: RefObject<HTMLDivElement>;
onClick: () => void;
onScrollToTop: () => void;
}

const FloatingButton = forwardRef<HTMLDivElement, Props>(
({ visible, onClick, onScrollToTop }, ref) => {

return (
<div className="fixed bottom-8 left-[calc(100vw-12px)] z-40 flex w-24 translate-x-[-100%] flex-col items-center gap-3">
{visible && (
<div ref={ref} className="flex flex-col items-center gap-3">
<div className="flex animate-fadeIn flex-col items-center gap-6 rounded-full bg-[#F2FAF7] px-4 py-[1.875rem] dark:bg-slate-500">
<Link
className="flex flex-col items-center text-sm hover:text-main"
href="/diary/write"
onClick={onClick}
>
<p>일기</p>
<p>등록하기</p>
</Link>
<Link
className="flex flex-col items-center text-sm hover:text-main"
href="/gathering/write"
onClick={onClick}
>
<p>모임</p>
<p>등록하기</p>
</Link>
<Link
className="flex flex-col items-center text-sm hover:text-main"
href="/informations/write"
onClick={onClick}
>
<p>여행정보</p>
<p>등록하기</p>
</Link>
</div>
<button
className="flex h-12 w-12 animate-buttonRotation flex-row items-center justify-center rounded-full bg-main text-white shadow-md hover:scale-105"
const FloatingButton = ({ visible, ref, onClick, onScrollToTop }: Props) => {
return (
<div className="fixed bottom-8 left-[calc(100vw-12px)] z-40 flex w-24 translate-x-[-100%] flex-col items-center gap-3">
{visible && (
<div ref={ref} className="flex flex-col items-center gap-3">
<div className="flex animate-fadeIn flex-col items-center gap-6 rounded-full bg-[#F2FAF7] px-4 py-[1.875rem] dark:bg-slate-500">
<Link
className="flex flex-col items-center text-sm hover:text-main"
href="/diary/write"
onClick={onClick}
>
<p>일기</p>
<p>등록하기</p>
</Link>
<Link
className="flex flex-col items-center text-sm hover:text-main"
href="/gathering/write"
onClick={onClick}
>
<p>모임</p>
<p>등록하기</p>
</Link>
<Link
className="flex flex-col items-center text-sm hover:text-main"
href="/informations/write"
onClick={onClick}
>
<MdClose size={"1.5rem"} />
</button>
<p>여행정보</p>
<p>등록하기</p>
</Link>
</div>
)}
{!visible && (
<button
className="flex h-12 w-12 flex-row items-center justify-center rounded-full bg-black text-white shadow-md hover:scale-105 dark:bg-slate-600"
className="flex h-12 w-12 animate-buttonRotation flex-row items-center justify-center rounded-full bg-main text-white shadow-md hover:scale-105"
onClick={onClick}
>
<Image
className="-ml-1"
src="/pencil-icon.png"
alt="pencil-icon"
width={24}
height={24}
/>
<MdClose size={"1.5rem"} />
</button>
)}
</div>
)}
{!visible && (
<button
className="flex h-12 w-12 flex-row items-center justify-center rounded-full bg-black text-white shadow-md hover:scale-105 dark:bg-slate-600"
onClick={onScrollToTop}
onClick={onClick}
>
<IoIosArrowUp size={"1.5rem"} />
<Image
className="-ml-1"
src="/pencil-icon.png"
alt="pencil-icon"
width={24}
height={24}
/>
</button>
</div>
);
},
);
)}
<button
className="flex h-12 w-12 flex-row items-center justify-center rounded-full bg-black text-white shadow-md hover:scale-105 dark:bg-slate-600"
onClick={onScrollToTop}
>
<IoIosArrowUp size={"1.5rem"} />
</button>
</div>
);
};

export default FloatingButton;
12 changes: 8 additions & 4 deletions src/components/support/SupportTerms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ const SupportTerms = (props: ISupportTerms) => {
return (
<section>
<article className="mb-20 mt-10 flex w-full flex-col gap-10">
<h2 className="text-3xl font-bold text-main" id={"terms-of-service"}>이용약관</h2>
<h2 className="text-3xl font-bold text-main" id={"terms-of-service"}>
이용약관
</h2>
<div className="flex flex-col gap-5">
<h3 className="text-xl font-bold">제1조 - 목적</h3>
<p>
Expand Down Expand Up @@ -333,15 +335,17 @@ const SupportTerms = (props: ISupportTerms) => {
</div>
</article>
<article>
<h1 className="mb-10 text-3xl font-bold text-main" id="privacy-policy">개인정보 처리방침</h1>
<h1 className="mb-10 text-3xl font-bold text-main" id="privacy-policy">
개인정보 처리방침
</h1>
<div className="space-y-8">
<div className="flex flex-col gap-5">
<h2 className="text-2xl font-bold">
제1조 - 개인정보의 수집 및 이용 목적
</h2>
<p>
Solitour(이하 "회사"라 합니다)는 다음과 같은 목적을 위해
개인정보를 수집하고 이용합니다:
{`Solitour(이하 "회사"라 합니다)는 다음과 같은 목적을 위해
개인정보를 수집하고 이용합니다:`}
</p>
<ul className="list-disc pl-5">
<li>서비스 제공 및 운영</li>
Expand Down
13 changes: 4 additions & 9 deletions src/containers/diary/edit/DiaryEditorContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const DiaryEditorContainer = ({ diaryData }: Props) => {
const authStore = useAuthStore();
const diaryEditorStore = useDiaryEditorStore();
const [dateRangeModal, setDateRangeModal] = useState<boolean>(false);
const [placeModal, setPlaceModal] = useState<boolean>(false);
const [addressModal, setAddressModal] = useState<boolean>(false);
const [loading, setLoading] = useState<boolean>(false);

const onSubmit = async () => {
Expand All @@ -31,7 +31,6 @@ const DiaryEditorContainer = ({ diaryData }: Props) => {
title: diaryEditorStore.title,
startDate: diaryEditorStore.startDate,
endDate: diaryEditorStore.endDate,
placeName: diaryEditorStore.placeName,
address: diaryEditorStore.address,
image:
parse(diaryEditorStore.contents[0])
Expand Down Expand Up @@ -104,10 +103,6 @@ const DiaryEditorContainer = ({ diaryData }: Props) => {
1000 * 60 * 60 * 24,
).toLocaleDateString("ko-KR"),
),
placeName:
diaryData.diaryContentResponse.diaryDayContentResponses.diaryDayContentDetail.map(
(value) => value.place,
),
address:
diaryData.diaryContentResponse.diaryDayContentResponses.diaryDayContentDetail.map(
(value) => value.place,
Expand Down Expand Up @@ -137,12 +132,12 @@ const DiaryEditorContainer = ({ diaryData }: Props) => {
text="수정"
diaryEditorStore={diaryEditorStore}
dateRangeModal={dateRangeModal}
placeModal={placeModal}
addressModal={addressModal}
loading={loading}
showDateRangeModal={() => setDateRangeModal(true)}
closeDateRangeModal={() => setDateRangeModal(false)}
showPlaceModal={() => setPlaceModal(true)}
closePlaceModal={() => setPlaceModal(false)}
showAddressModal={() => setAddressModal(true)}
closeAddressModal={() => setAddressModal(false)}
setCurrentDay={(day: number) =>
diaryEditorStore.setDiaryEditor({ currentDay: day })
}
Expand Down
8 changes: 0 additions & 8 deletions src/lib/zod/schema/DiaryUpdateFormSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@ export const DiaryUpdateFormSchema = z.object({
.max(new Date(new Date().getTime() + 1000 * 60 * 60 * 24), {
message: "미래에 해당하는 날짜는 입력할 수 없습니다.",
}),
placeName: z
.string({
required_error: "장소를 입력해 주세요.",
invalid_type_error: "PlaceName must be a string.",
})
.min(1, { message: "장소를 입력해 주세요." })
.array()
.min(1, { message: "장소를 입력해 주세요." }),
address: z
.string({
required_error: "주소를 입력해 주세요.",
Expand Down

0 comments on commit 1a70014

Please sign in to comment.