Skip to content

Conversation

@devmanta
Copy link
Collaborator

@devmanta devmanta commented Nov 17, 2024

πŸ“Œ Related Issue

close #5

πŸ“ Description

  • μ‚¬μ΄λ“œλ°” λŒ€μ‹œλ³΄λ“œλ¦¬μŠ€νŠΈ apiν˜ΈμΆœν•΄λ³΄λŠ” λΆ€λΆ„λ§Œ μΆ”κ°€(css μ•ˆλ˜μ–΄μžˆκ³  νŽ˜μ΄μ§•μ²˜λ¦¬μ•ˆλ˜μ–΄μžˆμŒ)
  • authorization middleware μΆ”κ°€
  • not found page ν‹€λ§Œ μΆ”κ°€

πŸ“’ Notes

  • 이슈 λŠμ–΄μ„œ μž‘μ—…ν•˜λ €κ³  μ΄λΆ€λΆ„κΉŒμ§€ ν•˜κ³  μƒˆλ‘œ νŒŒμ„œ λ‹€μŒμž‘μ—…μ§„ν–‰ν•˜λ €κ³  μ˜¬λ ΈμŠ΅λ‹ˆλ‹€~!

@devmanta devmanta self-assigned this Nov 17, 2024
@devmanta devmanta added πŸ“¬API Tasks related to integrating or connecting to external APIs βš™Setting Configuration and environment settings for the project labels Nov 17, 2024
alt="둜고 ν™ˆνŽ˜μ΄μ§€μ΄λ™"
width={24}
height={27}
priority
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ½˜μ†”μ— priorityλ„£μœΌλΌκ³  μ›Œλ”©λ– κ°€μ§€κ³  걍 λ„£μ—ˆμ–΄μš”

export function middleware(request: NextRequest) {
const user = request.cookies.get('user'); // TODO get token

// const restrictedPaths = ['/dashboard', '/mypage', '/mydashboard'];
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이게 μ§„μ§œ μ μš©λ˜μ–΄μ•Όν•˜λŠ” μ½”λ“œμΈλ° μ§€κΈˆ κ°œλ°œμ€‘μ΄λΌ μ£Όμ„μ²˜λ¦¬ ν•΄λ†¨μŠ΅λ‹ˆλ‹€

Copy link
Owner

@najitwo najitwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

κ³ μƒν•˜μ…¨μŠ΅λ‹ˆλ‹€~ 😁

λ””μ½” μ™œ μ•ˆλ˜μ£ ... πŸ˜‚

setLoading(false);
}
}, [url, options.method, options.params, options.body]);
}, [url, JSON.stringify(options)]);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ—¬κΈ°μ„œ JSON.stringify() 이것을 μ‚¬μš©ν•˜μ‹  μ˜λ„κ°€ λ­”κ°€μš”???
κ·Έλƒ₯ options둜 λ„£μœΌλ©΄ μ•ˆλ˜λ‚˜μš”?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@najitwo λ””μ½”μ•ˆλ¨222....
이거.. option듀이 항상 λ‹€λ₯Έκ°’을 κ°€μ§€κ³ μ˜€λŠ”κ±°λΌμ„œ λ¬΄ν•œλ‘œλ”© λ˜λ”λΌκ΅¬μš”...

import { NextRequest, NextResponse } from 'next/server';

export function middleware(request: NextRequest) {
const user = request.cookies.get('user'); // TODO get token
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

미듀웨어 μ‚¬μš©ν•˜λ €λ©΄ set cookie headerλ₯Ό μ„€μ •ν•΄μ•Όκ² λ„€μš” πŸ€”

Copy link
Collaborator Author

@devmanta devmanta Nov 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@najitwo μ•„..!
κ·ΈλŸ¬λ„€μš” μƒκ°ν•΄λ³΄λ‹ˆκΉ.. λΈŒλΌμš°μ € 가기전이라 accessToken μ»¨ν…μŠ€νŠΈμ—μ„œ λͺ»κ°€μ Έμ˜€λ„€μš”...? (λ§žλ‚˜..)
μ—„... 그럼 이거 λͺ»μ“°λŠ”λ°..

Copy link
Collaborator Author

@devmanta devmanta Nov 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ•„
const authHeader = request.headers.get('authorization');
μ΄λŸ°μ‹μœΌλ‘œ ν—€λ”μ—μ„œ κ°€μ Έμ˜€λ©΄λ˜λ‚˜λ΄μš”!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저희 apiκ°€ set cookie header κ°€ λ˜μžˆλŠ”κ²Œ μ•„λ‹ˆλΌκ°€μ§€κ³ ...μ•„λ§ˆ λ§Œλ“€μ–΄μ•Ό λ κ±°μ—μš”!!
둜그인 λ‘œμ§μ— cookies().set("accessToken", asdjaskdjaskd) μš”λŸ°μ‹μœΌλ‘œ

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
이게 둜그인 응닡 헀더인데 μ–΄λ–€ 값을 λ§μ”€ν•˜μ‹œλŠ” κ±΄κ°€μš”???

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ•„ μ•„λ‹™λ‹ˆλ‹€ μ œκ°€ 잘λͺ»μƒκ°ν–ˆμ–΄μš”
μΏ ν‚€ μ„€μ • μ§μ ‘ν•˜λŠ”κ±΄ 별둠데... γ… 

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이건... set cookie μ•ˆν•΄μ€€ λ°±μ—”λ“œ νƒ“μœΌλ‘œ 🀣

@devmanta devmanta merged commit b8c23c8 into develop Nov 17, 2024
@devmanta devmanta deleted the 5-add-header-sidebar-content branch November 17, 2024 06:14
najitwo pushed a commit that referenced this pull request Nov 18, 2024
* ✨ feat: add header and sidebar css and types

* 🍱 style: add favicon and title

* πŸ’„ style: add header button css

* πŸ’„ style: add header button icon

* ✨ feat: add userInfo component with skeleton

* πŸ’„ style: add sidebar dashboard span

* ♻️ refactor: add header directory

* 🎨 chore: add sidebar directory

* ✨ feat: add call dashboards on sidebar

* 🚚 chore: rename directory name under mydashboard to avoid routing

* ✨ feat: add middleware and 404 empty page
najitwo pushed a commit that referenced this pull request Nov 23, 2024
* ✨ feat: add header and sidebar css and types

* 🍱 style: add favicon and title

* πŸ’„ style: add header button css

* πŸ’„ style: add header button icon

* ✨ feat: add userInfo component with skeleton

* πŸ’„ style: add sidebar dashboard span

* ♻️ refactor: add header directory

* 🎨 chore: add sidebar directory

* ✨ feat: add call dashboards on sidebar

* 🚚 chore: rename directory name under mydashboard to avoid routing

* ✨ feat: add middleware and 404 empty page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

πŸ“¬API Tasks related to integrating or connecting to external APIs βš™Setting Configuration and environment settings for the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] add header, sidebar content

3 participants