Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
1 line
1.3 KiB
Plaintext
1 line
1.3 KiB
Plaintext
{"version":3,"file":"index.js","names":["isReactServerComponentOrFunction","React","WithServerSideProps","Component","serverOnlyProps","rest","passedProps","propsWithServerOnlyProps","_jsx"],"sources":["../../../src/elements/WithServerSideProps/index.tsx"],"sourcesContent":["import type { WithServerSidePropsComponent } from 'payload'\n\nimport { isReactServerComponentOrFunction } from 'payload/shared'\nimport React from 'react'\n\nexport const WithServerSideProps: WithServerSidePropsComponent = ({\n Component,\n serverOnlyProps,\n ...rest\n}) => {\n if (Component) {\n const WithServerSideProps: React.FC = (passedProps) => {\n const propsWithServerOnlyProps = {\n ...passedProps,\n ...(isReactServerComponentOrFunction(Component) ? (serverOnlyProps ?? {}) : {}),\n }\n\n return <Component {...propsWithServerOnlyProps} />\n }\n\n return WithServerSideProps(rest)\n }\n\n return null\n}\n"],"mappings":";AAEA,SAASA,gCAAgC,QAAQ;AACjD,OAAOC,KAAA,MAAW;AAElB,OAAO,MAAMC,mBAAA,GAAoDA,CAAC;EAChEC,SAAS;EACTC,eAAe;EACf,GAAGC;AAAA,CACJ;EACC,IAAIF,SAAA,EAAW;IACb,MAAMD,mBAAA,GAAiCI,WAAA;MACrC,MAAMC,wBAAA,GAA2B;QAC/B,GAAGD,WAAW;QACd,IAAIN,gCAAA,CAAiCG,SAAA,IAAcC,eAAA,IAAmB,CAAC,IAAK,CAAC,CAAC;MAChF;MAEA,oBAAOI,IAAA,CAACL,SAAA;QAAW,GAAGI;;IACxB;IAEA,OAAOL,mBAAA,CAAoBG,IAAA;EAC7B;EAEA,OAAO;AACT","ignoreList":[]} |