-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
234 additions
and
25 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,102 @@ | ||
/* | ||
* ATTENTION: An "eval-source-map" devtool has been used. | ||
* This devtool is neither made for production nor for readable output files. | ||
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools. | ||
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) | ||
* or disable the default devtool with "devtool: false". | ||
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). | ||
*/ | ||
/******/ (function() { // webpackBootstrap | ||
/******/ "use strict"; | ||
/******/ var __webpack_modules__ = ({ | ||
|
||
/***/ "./node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@ducanh2912/next-pwa/dist/sw-entry-worker.js": | ||
/*!*****************************************************************************************************************************************************************************!*\ | ||
!*** ./node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@ducanh2912/next-pwa/dist/sw-entry-worker.js ***! | ||
\*****************************************************************************************************************************************************************************/ | ||
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { | ||
|
||
eval(__webpack_require__.ts("__webpack_require__.r(__webpack_exports__);\nself.onmessage=async e=>{switch(e.data.type){case\"__START_URL_CACHE__\":{let t=e.data.url,a=await fetch(t);if(!a.redirected)return (await caches.open(\"start-url\")).put(t,a);return Promise.resolve()}case\"__FRONTEND_NAV_CACHE__\":{let t=e.data.url,a=await caches.open(\"pages\");if(await a.match(t,{ignoreSearch:!0}))return;let s=await fetch(t);if(!s.ok)return;if(a.put(t,s.clone()),e.data.shouldCacheAggressively&&s.headers.get(\"Content-Type\")?.includes(\"text/html\"))try{let e=await s.text(),t=[],a=await caches.open(\"static-style-assets\"),r=await caches.open(\"next-static-js-assets\"),c=await caches.open(\"static-js-assets\");for(let[s,r]of e.matchAll(/<link.*?href=['\"](.*?)['\"].*?>/g))/rel=['\"]stylesheet['\"]/.test(s)&&t.push(a.match(r).then(e=>e?Promise.resolve():a.add(r)));for(let[,a]of e.matchAll(/<script.*?src=['\"](.*?)['\"].*?>/g)){let e=/\\/_next\\/static.+\\.js$/i.test(a)?r:c;t.push(e.match(a).then(t=>t?Promise.resolve():e.add(a)));}return await Promise.all(t)}catch{}return Promise.resolve()}default:return Promise.resolve()}};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvLnBucG0vQGR1Y2FuaDI5MTIrbmV4dC1wd2FAMTAuMi4yX0Bzd2MrY29yZUAxLjQuMl9lc2J1aWxkQDAuMTguMjBfbmV4dEAxNC4wLjRfd2VicGFja0A1Ljg5LjAvbm9kZV9tb2R1bGVzL0BkdWNhbmgyOTEyL25leHQtcHdhL2Rpc3Qvc3ctZW50cnktd29ya2VyLmpzIiwibWFwcGluZ3MiOiI7QUFBQSx5QkFBeUIsb0JBQW9CLDJCQUEyQixrQ0FBa0Msa0VBQWtFLHlCQUF5Qiw4QkFBOEIsOENBQThDLG9CQUFvQixnQkFBZ0IsU0FBUyxxQkFBcUIsZ0JBQWdCLCtHQUErRywwSkFBMEosd0pBQXdKLDhEQUE4RCw0Q0FBNEMsMERBQTBELDRCQUE0QixPQUFPLHlCQUF5QiIsInNvdXJjZXMiOlsid2VicGFjazovL19OX0UvLi9ub2RlX21vZHVsZXMvLnBucG0vQGR1Y2FuaDI5MTIrbmV4dC1wd2FAMTAuMi4yX0Bzd2MrY29yZUAxLjQuMl9lc2J1aWxkQDAuMTguMjBfbmV4dEAxNC4wLjRfd2VicGFja0A1Ljg5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zaGVldFsnXCJdLy50ZXN0KHMpJiZ0LnB1c2goYS5tYXRjaChyKS50aGVuKGU9PmU/UHJvbWlzZS5yZXNvbHZlKCk6YS5hZGQocikpKTtmb3IobGV0WyxhXW9mIGUubWF0Y2hBbGwoLzxzY3JpcHQuKj9zcmM9WydcIl0oLio/KVsnXCJdLio/Pi9nKSl7bGV0IGU9L1xcL19uZXh0XFwvc3RhdGljLitcXC5qcyQvaS50ZXN0KGEpP3I6Yzt0LnB1c2goZS5tYXRjaChhKS50aGVuKHQ9PnQ/UHJvbWlzZS5yZXNvbHZlKCk6ZS5hZGQoYSkpKTt9cmV0dXJuIGF3YWl0IFByb21pc2UuYWxsKHQpfWNhdGNoe31yZXR1cm4gUHJvbWlzZS5yZXNvbHZlKCl9ZGVmYXVsdDpyZXR1cm4gUHJvbWlzZS5yZXNvbHZlKCl9fTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@ducanh2912/next-pwa/dist/sw-entry-worker.js\n")); | ||
|
||
/***/ }) | ||
|
||
/******/ }); | ||
/************************************************************************/ | ||
/******/ // The require scope | ||
/******/ var __webpack_require__ = {}; | ||
/******/ | ||
/************************************************************************/ | ||
/******/ /* webpack/runtime/make namespace object */ | ||
/******/ !function() { | ||
/******/ // define __esModule on exports | ||
/******/ __webpack_require__.r = function(exports) { | ||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | ||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
/******/ } | ||
/******/ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/******/ }; | ||
/******/ }(); | ||
/******/ | ||
/******/ /* webpack/runtime/trusted types policy */ | ||
/******/ !function() { | ||
/******/ var policy; | ||
/******/ __webpack_require__.tt = function() { | ||
/******/ // Create Trusted Type policy if Trusted Types are available and the policy doesn't exist yet. | ||
/******/ if (policy === undefined) { | ||
/******/ policy = { | ||
/******/ createScript: function(script) { return script; } | ||
/******/ }; | ||
/******/ if (typeof trustedTypes !== "undefined" && trustedTypes.createPolicy) { | ||
/******/ policy = trustedTypes.createPolicy("nextjs#bundler", policy); | ||
/******/ } | ||
/******/ } | ||
/******/ return policy; | ||
/******/ }; | ||
/******/ }(); | ||
/******/ | ||
/******/ /* webpack/runtime/trusted types script */ | ||
/******/ !function() { | ||
/******/ __webpack_require__.ts = function(script) { return __webpack_require__.tt().createScript(script); }; | ||
/******/ }(); | ||
/******/ | ||
/******/ /* webpack/runtime/react refresh */ | ||
/******/ !function() { | ||
/******/ if (__webpack_require__.i) { | ||
/******/ __webpack_require__.i.push(function(options) { | ||
/******/ var originalFactory = options.factory; | ||
/******/ options.factory = function(moduleObject, moduleExports, webpackRequire) { | ||
/******/ var hasRefresh = typeof self !== "undefined" && !!self.$RefreshInterceptModuleExecution$; | ||
/******/ var cleanup = hasRefresh ? self.$RefreshInterceptModuleExecution$(moduleObject.id) : function() {}; | ||
/******/ try { | ||
/******/ originalFactory.call(this, moduleObject, moduleExports, webpackRequire); | ||
/******/ } finally { | ||
/******/ cleanup(); | ||
/******/ } | ||
/******/ } | ||
/******/ }) | ||
/******/ } | ||
/******/ }(); | ||
/******/ | ||
/******/ /* webpack/runtime/compat */ | ||
/******/ | ||
/******/ | ||
/******/ // noop fns to prevent runtime errors during initialization | ||
/******/ if (typeof self !== "undefined") { | ||
/******/ self.$RefreshReg$ = function () {}; | ||
/******/ self.$RefreshSig$ = function () { | ||
/******/ return function (type) { | ||
/******/ return type; | ||
/******/ }; | ||
/******/ }; | ||
/******/ } | ||
/******/ | ||
/************************************************************************/ | ||
/******/ | ||
/******/ // startup | ||
/******/ // Load entry module and return exports | ||
/******/ // This entry module can't be inlined because the eval-source-map devtool is used. | ||
/******/ var __webpack_exports__ = {}; | ||
/******/ __webpack_modules__["./node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@ducanh2912/next-pwa/dist/sw-entry-worker.js"](0, __webpack_exports__, __webpack_require__); | ||
/******/ | ||
/******/ })() | ||
; |
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
export const dynamic = 'force-dynamic'; | ||
|
||
import CreateCharacter from '@/components/create-character'; | ||
import { PageContainer } from '@/components/ui'; | ||
import PageContainerV2 from '@/components/page-container-v2/page-container-v2'; | ||
|
||
// 로그인 이전에 캐릭터 생성하는 페이지 | ||
export default async function Page() { | ||
return ( | ||
<PageContainer> | ||
<PageContainerV2> | ||
<CreateCharacter /> | ||
</PageContainer> | ||
</PageContainerV2> | ||
); | ||
} |
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 |
---|---|---|
@@ -1,26 +1,26 @@ | ||
import { PageContainer } from '@/components/ui'; | ||
import { cookies } from 'next/headers'; | ||
import { Suspense } from 'react'; | ||
import Header from './_components/header'; | ||
import MemosContainer from './_components/memos-container'; | ||
import SearchBox from './_components/search-box'; | ||
import { allMemosQueryOptions } from '@/store/query/useAllMemosQuery'; | ||
import { PrefetchBoundary } from '@/context/prefetch-boundary'; | ||
import PageContainerV2 from '@/components/page-container-v2/page-container-v2'; | ||
|
||
export default async function MemosPage() { | ||
const accessToken = `${cookies().get('accessToken')?.value}`; | ||
|
||
const prefetchOptions = allMemosQueryOptions(accessToken); | ||
|
||
return ( | ||
<PageContainer bgColor="bg-[#F8F8FB]" hasNavigator> | ||
<PageContainerV2 bgColor="bg-[#F8F8FB]" hasNavigator> | ||
<Header text="기록" /> | ||
<SearchBox /> | ||
<Suspense> | ||
<PrefetchBoundary prefetchOptions={prefetchOptions}> | ||
<MemosContainer /> | ||
</PrefetchBoundary> | ||
</Suspense> | ||
</PageContainer> | ||
</PageContainerV2> | ||
); | ||
} |
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
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
31 changes: 31 additions & 0 deletions
31
src/components/page-container-v2/bottom-tab-navigator-v2.tsx
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import ROUTES from '@/constants/route'; | ||
import { NavigatorItem } from './navigator-item'; | ||
import { QueryClient } from '@tanstack/react-query'; | ||
import { memberQueryOptions } from '@/store/query/useCharacterDetailQueries'; | ||
import { cookies } from 'next/headers'; | ||
|
||
export const Menus = [ | ||
{ label: '홈', path: 'member/' }, | ||
{ label: '작성', path: `${ROUTES.memoCreate}` }, | ||
{ label: '기록', path: `${ROUTES.memos}` }, | ||
{ label: '내 정보', path: `${ROUTES.my}` }, | ||
] as const; | ||
|
||
export async function BottomTabNavigatorV2() { | ||
const queryClient = new QueryClient(); | ||
|
||
const memeberId = (await queryClient.ensureQueryData(memberQueryOptions(`${cookies().get('accessToken')?.value}`))) | ||
.memberId; | ||
|
||
return ( | ||
<div className="border-top nav-bar sticky bottom-0 left-0 right-0 z-10 border-t border-t-[#E8EAEE] bg-white"> | ||
<nav className="w-full"> | ||
<ul className="relative flex justify-around"> | ||
{Menus.map((menuItem) => ( | ||
<NavigatorItem key={menuItem.path} menuItem={menuItem} memberId={memeberId} /> | ||
))} | ||
</ul> | ||
</nav> | ||
</div> | ||
); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
'use client'; | ||
|
||
import Link from 'next/link'; | ||
import { usePathname } from 'next/navigation'; | ||
import { Member } from '@/services/auth/getMember'; | ||
import FileMultipleIcon from '@/assets/icons/file-multiple_24x24.svg'; | ||
import HomeIcon from '@/assets/icons/home_24x24.svg'; | ||
import PencilIcon from '@/assets/icons/pencil_24x24.svg'; | ||
import UserProfileIcon from '@/assets/icons/user-profile_24x24.svg'; | ||
import { Menus } from './bottom-tab-navigator-v2'; | ||
|
||
type Props = { | ||
menuItem: (typeof Menus)[number]; | ||
memberId: Member['memberId']; | ||
}; | ||
|
||
const IconsMap = { | ||
홈: HomeIcon, | ||
작성: PencilIcon, | ||
기록: FileMultipleIcon, | ||
'내 정보': UserProfileIcon, | ||
}; | ||
|
||
export function NavigatorItem({ menuItem: { path, label }, memberId }: Props) { | ||
const pathname = usePathname(); | ||
const isCurrentLocation = pathname.includes(path); | ||
|
||
const href = path === 'member/' ? `${path}${memberId}` : path; | ||
const IconComponent = IconsMap[label]; | ||
|
||
return ( | ||
<> | ||
<Link href={href} className="h-full w-full items-center justify-center"> | ||
<div className="flex flex-col items-center justify-center gap-1 pb-3 pt-2"> | ||
<span> | ||
<IconComponent className={isCurrentLocation ? 'fill-primary-500' : 'fill-newGray-400'} /> | ||
</span> | ||
<span | ||
className={`text-[12px] leading-4 ${isCurrentLocation ? 'text-primary-500' : 'text-newGray-400'}`} | ||
> | ||
{label} | ||
</span> | ||
</div> | ||
</Link> | ||
</> | ||
); | ||
} |
Oops, something went wrong.