Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
1 line
No EOL
1.9 KiB
Text
1 line
No EOL
1.9 KiB
Text
{"version":3,"sources":["../../src/client/with-router.tsx"],"sourcesContent":["import React, { type JSX } from 'react'\nimport type {\n BaseContext,\n NextComponentType,\n NextPageContext,\n} from '../shared/lib/utils'\nimport type { NextRouter } from './router'\nimport { useRouter } from './router'\n\nexport type WithRouterProps = {\n router: NextRouter\n}\n\nexport type ExcludeRouterProps<P> = Pick<\n P,\n Exclude<keyof P, keyof WithRouterProps>\n>\n\nexport default function withRouter<\n P extends WithRouterProps,\n C extends BaseContext = NextPageContext,\n>(\n ComposedComponent: NextComponentType<C, any, P>\n): React.ComponentType<ExcludeRouterProps<P>> {\n function WithRouterWrapper(props: any): JSX.Element {\n return <ComposedComponent router={useRouter()} {...props} />\n }\n\n WithRouterWrapper.getInitialProps = ComposedComponent.getInitialProps\n // This is needed to allow checking for custom getInitialProps in _app\n ;(WithRouterWrapper as any).origGetInitialProps = (\n ComposedComponent as any\n ).origGetInitialProps\n if (process.env.NODE_ENV !== 'production') {\n const name =\n ComposedComponent.displayName || ComposedComponent.name || 'Unknown'\n WithRouterWrapper.displayName = `withRouter(${name})`\n }\n\n return WithRouterWrapper\n}\n"],"names":["withRouter","ComposedComponent","WithRouterWrapper","props","router","useRouter","getInitialProps","origGetInitialProps","process","env","NODE_ENV","name","displayName"],"mappings":";;;;+BAkBA;;;eAAwBA;;;;;gEAlBQ;wBAON;AAWX,SAASA,WAItBC,iBAA+C;IAE/C,SAASC,kBAAkBC,KAAU;QACnC,qBAAO,qBAACF;YAAkBG,QAAQC,IAAAA,iBAAS;YAAK,GAAGF,KAAK;;IAC1D;IAEAD,kBAAkBI,eAAe,GAAGL,kBAAkBK,eAAe;IAEnEJ,kBAA0BK,mBAAmB,GAAG,AAChDN,kBACAM,mBAAmB;IACrB,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,MAAMC,OACJV,kBAAkBW,WAAW,IAAIX,kBAAkBU,IAAI,IAAI;QAC7DT,kBAAkBU,WAAW,GAAG,CAAC,WAAW,EAAED,KAAK,CAAC,CAAC;IACvD;IAEA,OAAOT;AACT","ignoreList":[0]} |