Skip to content

Commit

Permalink
Merge pull request #191 from official-Trippy/feature/#127
Browse files Browse the repository at this point in the history
fix: window 에러
  • Loading branch information
kimkimjunjun authored Sep 30, 2024
2 parents 2d91c8c + 30f42c9 commit e0f4b5c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app/post/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ function PostWrite() {
const [result1, setResult1] = useState<ApiResponse | null>(null);
const [transportStr, setTransportStr] = useState('');
const accessToken = Cookies.get("accessToken");
const [isClient, setIsClient] = useState(false);

useEffect(() => {
setIsClient(true);
}, []);

useEffect(() => {
setIsImageIdx([
Expand Down Expand Up @@ -430,7 +435,7 @@ function PostWrite() {
></button>
<button className='ml-auto flex bg-[#FB3463] text-white text-[1.6rem] font-semibold rounded-[1rem] px-[2.5rem] py-[0.5rem]' onClick={addPost}>올리기</button>
</div>
{window.innerWidth > 600 ? (
{isClient && window.innerWidth > 600 ? (
<div className='w-full h-[32rem] border border-[#D9D9D9] rounded-[1rem] flex mx-auto mt-[2rem]'>
<div className={`w-[15.4rem] h-full bg-[${bgColor}] rounded-l-[1rem]`}></div>
<div className='w-full mt-[5rem] relative'>
Expand Down

0 comments on commit e0f4b5c

Please sign in to comment.