Files
bot-whatsapp/packages/portal/src/components/qr/qr.tsx
2023-01-09 21:27:35 +01:00

32 lines
589 B
TypeScript

import {
component$,
useClientEffect$,
useStore,
useStylesScoped$,
} from '@builder.io/qwik'
import style from './qr.css?inline'
export const QR = component$(() => {
useStylesScoped$(style)
const state = useStore({
count: 0,
})
useClientEffect$(() => {
setInterval(() => {
state.count++
}, 800)
})
return (
<div>
<img
width={350}
height={350}
src={'qr.png?time=' + state.count}
alt="QR"
/>
</div>
)
})