Skip to content

Commit

Permalink
fix: Post 자동저장 주기 10 -> 30초 / PostPc 솔로 아티스트도 가능하게 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
han-kimm committed May 13, 2024
1 parent be3eefe commit c6da583
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/(route)/post/_components/PostPc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const PostPc = () => {
const { watch } = useFormContext();
const { isCheck } = useStore((state) => ({ isCheck: state.isWarningCheck }));
const { address, artists, groupId, eventType, placeName, startDate, endDate } = watch();
const isDisabled = !(artists.length > 0 && address && artists && groupId && eventType && placeName && startDate && endDate) || !isCheck;
const isDisabled = !(((groupId && artists.length === 0) || artists.length > 0) && address && eventType && placeName && startDate && endDate) || !isCheck;

return (
<div className="flex max-w-[68.8rem] flex-col gap-32 pb-120">
Expand Down
2 changes: 1 addition & 1 deletion app/_components/GenericFormProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const GenericFormProvider = <T extends FieldValues>({ children, formOptions }: G

useEffect(() => {
if (path === "/signup" || path === "/reset-password") return;
const intervalId = setInterval(savePostInput, 10000);
const intervalId = setInterval(savePostInput, 1000 * 30);
if (path !== "/post") clearInterval(intervalId);
return () => clearInterval(intervalId);
}, []);
Expand Down
1 change: 0 additions & 1 deletion app/_constants/confetti.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import confetti, { Options } from "canvas-confetti";
import { usePathname } from "next/navigation";
import { RefObject } from "react";

export const SHOT_SIGNIN: Options[] = [
Expand Down

0 comments on commit c6da583

Please sign in to comment.