22 lines
13 KiB
JavaScript
22 lines
13 KiB
JavaScript
"use strict";
|
|
/*
|
|
* 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/).
|
|
*/
|
|
self["webpackHotUpdate_N_E"]("app/gunbuilder/page",{
|
|
|
|
/***/ "(app-pages-browser)/./components/CategoryColumn.tsx":
|
|
/*!***************************************!*\
|
|
!*** ./components/CategoryColumn.tsx ***!
|
|
\***************************************/
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
eval(__webpack_require__.ts("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CategoryColumn: function() { return /* binding */ CategoryColumn; }\n/* harmony export */ });\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ \"(app-pages-browser)/./node_modules/next/dist/compiled/react/jsx-dev-runtime.js\");\n/* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! next/link */ \"(app-pages-browser)/./node_modules/next/dist/api/link.js\");\n/* harmony import */ var _components_PartCard__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/PartCard */ \"(app-pages-browser)/./components/PartCard.tsx\");\n/* __next_internal_client_entry_do_not_use__ CategoryColumn auto */ \n\n\nfunction CategoryColumn(param) {\n let { category, parts, selectedPartId, onSelectPart } = param;\n // Show selected part if available, otherwise show first part\n const displayedPart = selectedPartId ? parts.find((p)=>p.id === selectedPartId) || parts[0] : parts[0];\n return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"flex flex-col h-full\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"mb-3\",\n children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"h2\", {\n className: \"text-xs font-semibold tracking-[0.15em] text-zinc-400 uppercase\",\n children: category.name\n }, void 0, false, {\n fileName: \"/Users/sean/Dev/gunbuilder-prototype/components/CategoryColumn.tsx\",\n lineNumber: 28,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: \"/Users/sean/Dev/gunbuilder-prototype/components/CategoryColumn.tsx\",\n lineNumber: 27,\n columnNumber: 7\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"flex-1 overflow-y-auto pr-1\",\n children: [\n parts.length === 0 && /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"p\", {\n className: \"text-xs text-zinc-500\",\n children: \"No parts yet for this category.\"\n }, void 0, false, {\n fileName: \"/Users/sean/Dev/gunbuilder-prototype/components/CategoryColumn.tsx\",\n lineNumber: 34,\n columnNumber: 11\n }, this),\n displayedPart && /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_components_PartCard__WEBPACK_IMPORTED_MODULE_2__.PartCard, {\n part: displayedPart,\n selected: displayedPart.id === selectedPartId,\n onSelect: ()=>onSelectPart(displayedPart.id)\n }, displayedPart.id, false, {\n fileName: \"/Users/sean/Dev/gunbuilder-prototype/components/CategoryColumn.tsx\",\n lineNumber: 37,\n columnNumber: 11\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/Users/sean/Dev/gunbuilder-prototype/components/CategoryColumn.tsx\",\n lineNumber: 32,\n columnNumber: 7\n }, this),\n parts.length > 1 && /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(next_link__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n href: \"/gunbuilder/\".concat(category.id),\n className: \"mt-2 w-full rounded-md border border-zinc-700 bg-zinc-900/50 px-3 py-2 text-xs font-medium text-zinc-300 hover:bg-zinc-800 hover:border-zinc-600 transition-colors text-center\",\n children: [\n \"View All (\",\n parts.length,\n \")\"\n ]\n }, void 0, true, {\n fileName: \"/Users/sean/Dev/gunbuilder-prototype/components/CategoryColumn.tsx\",\n lineNumber: 46,\n columnNumber: 9\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/Users/sean/Dev/gunbuilder-prototype/components/CategoryColumn.tsx\",\n lineNumber: 26,\n columnNumber: 5\n }, this);\n}\n_c = CategoryColumn;\nvar _c;\n$RefreshReg$(_c, \"CategoryColumn\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevSignature = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevSignature) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports signature on update so we can compare the boundary\n // signatures. We avoid saving exports themselves since it causes memory leaks (https://github.com/vercel/next.js/pull/53797)\n module.hot.dispose(function (data) {\n data.prevSignature =\n self.$RefreshHelpers$.getRefreshBoundarySignature(currentExports);\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevSignature !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevSignature, self.$RefreshHelpers$.getRefreshBoundarySignature(currentExports))) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevSignature !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1wYWdlcy1icm93c2VyKS8uL2NvbXBvbmVudHMvQ2F0ZWdvcnlDb2x1bW4udHN4IiwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBRTZCO0FBRW9CO0FBUzFDLFNBQVNFLGVBQWUsS0FLVDtRQUxTLEVBQzdCQyxRQUFRLEVBQ1JDLEtBQUssRUFDTEMsY0FBYyxFQUNkQyxZQUFZLEVBQ1EsR0FMUztJQU03Qiw2REFBNkQ7SUFDN0QsTUFBTUMsZ0JBQWdCRixpQkFDbEJELE1BQU1JLElBQUksQ0FBQyxDQUFDQyxJQUFNQSxFQUFFQyxFQUFFLEtBQUtMLG1CQUFtQkQsS0FBSyxDQUFDLEVBQUUsR0FDdERBLEtBQUssQ0FBQyxFQUFFO0lBRVoscUJBQ0UsOERBQUNPO1FBQU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CJuYW1lIiwibGVuZ3RoIiwicGFydCIsInNlbGVjdGVkIiwib25TZWxlY3QiLCJocmVmIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-pages-browser)/./components/CategoryColumn.tsx\n"));
|
|
|
|
/***/ })
|
|
|
|
}); |