[TIL] 230101-6

BeanxxΒ·2023λ…„ 1μ›” 8일
1

TIL

λͺ©λ‘ 보기
119/120

πŸ”₯ 였늘 ν•œ 일

  • LinkedIn 등둝
  • [Qumunity ν”Œμ ]
    • Footer & Header 버그 μˆ˜μ •
    • style: height & margin μ‘°μ •
  • [ν”„λ‘œκ·Έλž˜λ¨ΈμŠ€] Lv.2 124 λ‚˜λΌμ˜ 숫자, 쀄 μ„œλŠ” 방법 2문제 μ™„λ£Œ
  • [λ°±μ€€] μ •λ ¬ 2문제 μ™„λ£Œ
  • μ›ν‹°λ“œ ν”„λ¦¬μ˜¨λ³΄λ”© ν”„λ‘ νŠΈμ—”λ“œ μ±Œλ¦°μ§€ 사전 λ―Έμ…˜ κ΅¬ν˜„
    • Next.js + TypeScript + Redux-Toolkit + styled-components μ„ΈνŒ…
    • eslintrc(airbnb) + prettier μ„€μ •
    • 둜그인, νšŒμ›κ°€μž… κΈ°λŠ₯ κ΅¬ν˜„

🚨 Error Handling

πŸ’« z-index μ•ˆ λ¨ΉνžˆλŠ” 문제

header, footerλ₯Ό κ΅¬ν˜„ν•˜λŠ” κ³Όμ •μ—μ„œ μŠ€ν¬λ‘€ν–ˆμ„ λ•Œ λ‚΄μš© μ˜μ—­μ΄ header, footer μœ„λ‘œ μ˜¬λΌμ˜€λŠ” z-indexκ°€ 먹지 μ•ŠλŠ” λ¬Έμ œκ°€ λ°œμƒν–ˆλ‹€.

πŸ”— CSS - z-index 적용 μ•ˆλ λ•Œ (Why your z-index isn't working)

이 λ•Œ, position: relativeλ₯Ό ν•¨κ»˜ μ‚¬μš©ν•˜λ‹ˆκΉŒ λ¨ΉνžŒλ‹€!

position: relative;
z-index: 1;

🧚 μƒˆλ‘­κ²Œ μ•Œκ²Œ 된 λ‚΄μš©

πŸ’« foreachλ¬Έ

const numbers = [1, 2, 3, 4, 5];
numbers.forEach(function(number) {
  console.log(number);
});

1
2
3
4
5

πŸ’« Next.js - useRouter

πŸ”— Routing: Linking and Navigating | Next.js

import { useRouter } from 'next/navigation';

export default function Page() {
  const router = useRouter();

  return (
    <button type="button" onClick={() => router.push('/dashboard')}>
      Dashboard
    </button>);
}

✍️ Diary

연말, μ—°μ΄ˆλΌ μ’€ 헀이해진 λŠλ‚Œμ΄ μžˆλŠ”λ° λ‹€μ‹œ μ—΄μ‹¬νžˆ μ·¨μ€€ν•΄λ³΄μž!
9일뢀터 μ›ν‹°λ“œ ν”„λ¦¬μ˜¨λ³΄λ”© κ°•μ˜λ„ λ“€μœΌλ©΄μ„œ μ’€ 더 사기λ₯Ό λΆλ‹μ•„λ³΄μžκ΅¬..

profile
FE developer

0개의 λŒ“κΈ€