Merge pull request #410 from codigoencasa/feature/qr-file-name

fix:  fix inject port args
This commit is contained in:
Leifer Mendez
2023-01-09 21:28:32 +01:00
committed by GitHub
2 changed files with 2 additions and 6 deletions

View File

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

View File

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