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.1 KiB
Plaintext
1 line
1.1 KiB
Plaintext
{"version":3,"file":"getCustomViewByKey.js","names":["getCustomViewByKey","config","viewKey","customViewComponent","admin","components","views","view","payloadComponent","Component"],"sources":["../../../src/views/Root/getCustomViewByKey.ts"],"sourcesContent":["import type { AdminViewServerProps, PayloadComponent, SanitizedConfig } from 'payload'\n\nimport type { ViewFromConfig } from './getRouteData.js'\n\nexport const getCustomViewByKey = ({\n config,\n viewKey,\n}: {\n config: SanitizedConfig\n viewKey: string\n}): {\n view: ViewFromConfig\n viewKey: string\n} | null => {\n const customViewComponent = config.admin.components?.views?.[viewKey]\n\n if (!customViewComponent) {\n return null\n }\n\n return {\n view: {\n payloadComponent: customViewComponent.Component as PayloadComponent<AdminViewServerProps>,\n },\n viewKey,\n }\n}\n"],"mappings":"AAIA,OAAO,MAAMA,kBAAA,GAAqBA,CAAC;EACjCC,MAAM;EACNC;AAAO,CAIR;EAIC,MAAMC,mBAAA,GAAsBF,MAAA,CAAOG,KAAK,CAACC,UAAU,EAAEC,KAAA,GAAQJ,OAAA,CAAQ;EAErE,IAAI,CAACC,mBAAA,EAAqB;IACxB,OAAO;EACT;EAEA,OAAO;IACLI,IAAA,EAAM;MACJC,gBAAA,EAAkBL,mBAAA,CAAoBM;IACxC;IACAP;EACF;AACF","ignoreList":[]} |