-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Link, route.push 상관없이 파라미터 받아오기 완료 (#35)
- Loading branch information
Showing
4 changed files
with
8 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
export default function UserLayout({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<section> | ||
<div>여기가 레이아웃</div> | ||
{children} | ||
</section> | ||
); | ||
return <section>{children}</section>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
|
||
.container { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
"use client"; | ||
|
||
import { useSearchParams } from "next/navigation"; | ||
import { useParams } from "next/navigation"; | ||
import React from "react"; | ||
import cn from "@/utils/classNames"; | ||
import styles from "./OtherPage.module.scss"; | ||
|
||
export default function OtherPage() { | ||
const userId = useSearchParams(); | ||
// userId를 받아오는 useParams function | ||
const { userId } = useParams<{ userId: string }>(); | ||
|
||
return ( | ||
<div className={cn(styles.container)}> | ||
<h1> OtherPage test </h1> | ||
<span>{userId}</span> | ||
<span>userId: {userId}</span> | ||
</div> | ||
); | ||
} |