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.0 KiB
Plaintext
1 line
1.0 KiB
Plaintext
{"version":3,"file":"handleGoBack.js","names":["formatAdminURL","handleGoBack","adminRoute","collectionSlug","router","serverURL","redirectRoute","path","push"],"sources":["../../src/utilities/handleGoBack.tsx"],"sourcesContent":["import type { AppRouterInstance } from 'next/dist/shared/lib/app-router-context.shared-runtime.js'\n\nimport { formatAdminURL } from 'payload/shared'\n\ntype GoBackProps = {\n adminRoute: string\n collectionSlug: string\n router: AppRouterInstance\n serverURL?: string\n}\n\nexport const handleGoBack = ({ adminRoute, collectionSlug, router, serverURL }: GoBackProps) => {\n const redirectRoute = formatAdminURL({\n adminRoute,\n path: collectionSlug ? `/collections/${collectionSlug}` : '/',\n })\n router.push(redirectRoute)\n}\n"],"mappings":"AAEA,SAASA,cAAc,QAAQ;AAS/B,OAAO,MAAMC,YAAA,GAAeA,CAAC;EAAEC,UAAU;EAAEC,cAAc;EAAEC,MAAM;EAAEC;AAAS,CAAe;EACzF,MAAMC,aAAA,GAAgBN,cAAA,CAAe;IACnCE,UAAA;IACAK,IAAA,EAAMJ,cAAA,GAAiB,gBAAgBA,cAAA,EAAgB,GAAG;EAC5D;EACAC,MAAA,CAAOI,IAAI,CAACF,aAAA;AACd","ignoreList":[]} |