Apply suggestion from @gemini-code-assist[bot]

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
Stephen Zhou 2026-01-23 11:16:10 +08:00 committed by GitHub
parent 00ec2c2623
commit b6141a135c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,13 +4,13 @@ import { SerwistProvider } from '@serwist/turbopack/react'
import { IS_DEV } from '@/config'
export function PWAProvider({ children }: { children: React.ReactNode }) {
const basePath = process.env.NEXT_PUBLIC_BASE_PATH || ''
const swUrl = `${basePath}/serwist/sw.js`
if (IS_DEV) {
return <>{children}</>
}
const basePath = process.env.NEXT_PUBLIC_BASE_PATH || ''
const swUrl = `${basePath}/serwist/sw.js`
return (
<SerwistProvider swUrl={swUrl}>
{children}