Skip to content

Commit

Permalink
feat: eslint changed for build
Browse files Browse the repository at this point in the history
  • Loading branch information
loopy-lim committed Jan 10, 2024
1 parent 8295592 commit a6077de
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 33 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ module.exports = {
plugins: ["react-refresh"],
rules: {
"react-refresh/only-export-components": "off",
"@next/next/no-img-element": "off",
"no-unused-vars": "off",
},
};
2 changes: 1 addition & 1 deletion app/contact/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const ContactPage = () => {
const [isLoading, setIsLoading] = useAtom(loadingState);
useEffect(() => {
setIsLoading(false);
}, []);
}, [setIsLoading]);

return (
<>
Expand Down
2 changes: 1 addition & 1 deletion app/portfolio/dev/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const PortfolioPage = () => {
const [isLoading, setIsLoading] = useAtom(loadingState);
useEffect(() => {
setIsLoading(false);
}, []);
}, [setIsLoading]);

return (
<>
Expand Down
2 changes: 1 addition & 1 deletion app/portfolio/hackathon/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const HackathonPage = () => {
const [isLoading, setIsLoading] = useAtom(loadingState);
useEffect(() => {
setIsLoading(false);
}, []);
}, [setIsLoading]);

return (
<>
Expand Down
6 changes: 3 additions & 3 deletions src/components/common/InputTextHover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { FC, useEffect, useId, useState } from "react";
interface InputHoverProps {
label?: string;
value: string;
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
onChange: () => void;
placeholder?: string;
className?: string;
}
Expand All @@ -25,7 +25,7 @@ export const InputTextHover: FC<InputHoverProps> = ({
return (
<div className="relative">
<input
className={`font-sans hover:visible hover:w-[16.5rem] transition-all border-b-2 border-[#7E7E7E] outline-none ${
className={`border-b-2 border-[#7E7E7E] font-sans outline-none transition-all hover:visible hover:w-[16.5rem] ${
isShow ? "visible w-[16.5rem]" : "invisible w-[9rem]"
} ${className}`}
type="text"
Expand All @@ -35,7 +35,7 @@ export const InputTextHover: FC<InputHoverProps> = ({
onChange={onChange}
/>
<label
className={`absolute top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] cursor-pointer transition-all hover:opacity-0 text-[#7E7E7E] ${
className={`absolute left-[50%] top-[50%] translate-x-[-50%] translate-y-[-50%] cursor-pointer text-[#7E7E7E] transition-all hover:opacity-0 ${
isShow ? "opacity-0" : "opacity-100"
}`}
htmlFor={uid}
Expand Down
1 change: 0 additions & 1 deletion src/components/common/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { RECRUIT } from "@/src/constants/recruit/recruit.ko";
import { LinkTo } from "@/src/components/common/LinkTo";
import { MAIN_NAV } from "@/src/constants/main.ko";
import { Icon } from "./Icon";
import { HambergerMenu } from "./Hamberger";

const NavbarDesktop = () => {
Expand Down
5 changes: 3 additions & 2 deletions src/components/common/TextTransition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ export const TextTransition: FC<PropsWithChildren<TextTransitionProps>> = ({
<animated.div
style={{ ...styles }}
ref={item === children ? currentRef : undefined}
children={item}
/>
>
{item}
</animated.div>
))}
</animated.div>
);
Expand Down
7 changes: 3 additions & 4 deletions src/components/main/Award/Group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,15 @@ export const AwardGroup: FC<AwardGroupProps> = ({
return () => {
ctx.revert();
};
}, []);
}, [awardYearProgressRef]);
return (
<div className="flex flex-col border-l border-black pl-4 my-12">
<div className="my-12 flex flex-col border-l border-black pl-4">
{data.DATA.map((data, index) => (
<AwardGroupItem data={data} key={index} />
))}
<div
className="translate-x-[15vw] border-b-[1px] border-black translate-y-6"
className="translate-x-[15vw] translate-y-6 border-b-[1px] border-black"
ref={(el) =>
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
(awardSplitRef.current[awardSplitRef.current.length] = el!)
}
></div>
Expand Down
11 changes: 4 additions & 7 deletions src/components/main/Award/GroupItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const AwardGroupItem: FC<AwardGroupItemProps> = ({ data }) => {
}, 300);
}
return () => clearInterval(intervalId.current);
}, [isStringChange]);
}, [isStringChange, awardTeamAndPeopleString.length]);

const onHover = () => {
setIsStringChange(true);
Expand All @@ -68,16 +68,13 @@ export const AwardGroupItem: FC<AwardGroupItemProps> = ({ data }) => {

return (
<div
className="translate-x-[15vw] flex justify-between text-2xl p-4 group hover:bg-[#0038FF] hover:text-white transition-colors duration-300"
ref={(el) =>
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
(awardItemsRef.current[awardItemsRef.current.length] = el!)
}
className="group flex translate-x-[15vw] justify-between p-4 text-2xl transition-colors duration-300 hover:bg-[#0038FF] hover:text-white"
ref={(el) => (awardItemsRef.current[awardItemsRef.current.length] = el!)}
onMouseEnter={onHover}
onMouseLeave={onLeave}
>
<div className="font-light">{data.TITLE}</div>
<TextTransition className="font-normal flex-1 justify-end">
<TextTransition className="flex-1 justify-end font-normal">
{
awardTeamAndPeopleString[
stringIndex % awardTeamAndPeopleString.length
Expand Down
26 changes: 14 additions & 12 deletions src/components/recruit/Waiting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@ import { RECRUIT } from "@/src/constants/recruit/recruit.ko";
import { InputTextHover } from "../common/InputTextHover";
import { ChangeEvent, FormEvent } from "react";

interface WaitingProps {
scrollToRecruit: () => void;
inputValue: string;
inputOnChange: (e: ChangeEvent<HTMLInputElement>) => void;
}

export const Waiting = ({
scrollToRecruit,
inputValue,
inputOnChange,
}: {
scrollToRecruit: () => void;
inputValue: string;
inputOnChange: (e: ChangeEvent<HTMLInputElement>) => void;
}) => {
}: WaitingProps) => {
const onSubmit = (e: FormEvent<HTMLFormElement>) => {
e.preventDefault();
fetch("/api/recruit/subscribe", {
Expand All @@ -25,15 +27,15 @@ export const Waiting = ({
} as ChangeEvent<HTMLInputElement>);
}
})
.catch((err) => {
.catch(() => {
alert(RECRUIT.WAITING.ALERT_FAIL);
});
};

return (
<div className="flex flex-col align-center justify-center text-2xl leading-relaxed text-center mb-60 h-screen">
<div className="align-center mb-60 flex h-screen flex-col justify-center text-center text-2xl leading-relaxed">
<div>
<h1 className="text-[9.5rem] uppercase font-bold text-center my-8 leading-[9.5rem]">
<h1 className="my-8 text-center text-[9.5rem] font-bold uppercase leading-[9.5rem]">
{RECRUIT.WAITING.TITLE}
</h1>
{RECRUIT.WAITING.CONTENT.split("\n").map((d, i) => (
Expand All @@ -45,25 +47,25 @@ export const Waiting = ({
</div>
<form className="my-40 text-2xl" onSubmit={onSubmit}>
<InputTextHover
onChange={inputOnChange}
onChange={() => inputOnChange}
value={inputValue}
placeholder="[email protected]"
label={RECRUIT.WAITING.EMAIL_INPUT}
/>
<button
type="submit"
className="text-lg mt-4 border text-[#0038FF] border-[#0038FF] rounded-full px-4 py-2"
className="mt-4 rounded-full border border-[#0038FF] px-4 py-2 text-lg text-[#0038FF]"
>
{RECRUIT.WAITING.ALERT_BUTTON}
</button>
</form>
<div>
<div className="text-[#565656] mb-20 text-base">
<div className="mb-20 text-base text-[#565656]">
*{RECRUIT.WAITING.EMAIL_ALERT}
</div>
<div className="flex items-center justify-center">
<button
className="flex bg-[#0038FF] text-white px-6 py-3 gap-4 rounded-full text-xl items-center"
className="flex items-center gap-4 rounded-full bg-[#0038FF] px-6 py-3 text-xl text-white"
onClick={scrollToRecruit}
>
<span>{RECRUIT.WAITING.VIEW_BUTTON}</span>
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useTimeDiffer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const useTimeDiffer = (date: Date) => {
return () => {
clearInterval(timer);
};
}, []);
}, [date]);

return { days, hours, minutes, seconds };
};

0 comments on commit a6077de

Please sign in to comment.