fix: fix inject port args

This commit is contained in:
Leifer Mendez
2023-01-09 21:27:35 +01:00
parent d794f604ac
commit 7a23eb0cc6
2 changed files with 2 additions and 6 deletions

View File

@@ -30,7 +30,7 @@ const start = (args) => {
polka()
.use(serve)
.get(qrFile, (_, res) => {
.get('qr.png', (_, res) => {
const qrSource = [
join(process.cwd(), qrFile),
join(__dirname, '..', qrFile),

View File

@@ -4,7 +4,6 @@ import {
useStore,
useStylesScoped$,
} from '@builder.io/qwik'
import { useLocation } from '@builder.io/qwik-city'
import style from './qr.css?inline'
export const QR = component$(() => {
@@ -19,15 +18,12 @@ export const QR = component$(() => {
}, 800)
})
const location = useLocation()
const qrImage = location.query?.qr ?? 'qr.png'
return (
<div>
<img
width={350}
height={350}
src={qrImage + '?time=' + state.count}
src={'qr.png?time=' + state.count}
alt="QR"
/>
</div>