Skip to content

Commit

Permalink
Fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
midudev committed Sep 4, 2023
1 parent 0f6a6a6 commit 60220f3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
6 changes: 4 additions & 2 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ const PREFIX_CDN = 'https://uqfzwvabnygcbokitxqs.supabase.co/storage/v1/object/p
const title = 'miduConf - La conferencia de programación y desarrollo'
const description =
'Conferencia de programación y tecnología para el día del programador y la programadora'
const ogImage = '/og-image.png'
const defaultOgImage = '/og-image.png'
const url = 'https://miduconf.com'

export default function Home ({ username, flavor, ticketNumber }) {
export default function Home({ username, flavor, ticketNumber }) {
const ogImage = username ? `${PREFIX_CDN}/ticket-${ticketNumber}.png` : `${url}${defaultOgImage}`

return (
<>
<Head>
Expand Down
11 changes: 5 additions & 6 deletions src/pages/ticket.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const interTight = InterTight({

const PREFIX_CDN = 'https://ljizvfycxyxnupniyyxb.supabase.co/storage/v1/object/public/tickets'

async function dataUrlToFile (dataUrl, fileName) {
async function dataUrlToFile(dataUrl, fileName) {
const res = await fetch(dataUrl)
const blob = await res.blob()
return new File([blob], fileName, { type: 'image/jpg' })
Expand All @@ -40,7 +40,7 @@ const getInfoFromUser = ({ user }) => {
return { avatar, fullname, username }
}

export default function Ticket ({ user, ticketNumber, selectedFlavor = 'javascript' }) {
export default function Ticket({ user, ticketNumber, selectedFlavor = 'javascript' }) {
const [buttonText, setButtonText] = useState(STEPS_LOADING.ready)
const [number, setNumber] = useState(ticketNumber)
const [flavorKey, setFlavorKey] = useState(selectedFlavor)
Expand Down Expand Up @@ -194,15 +194,14 @@ https://miduconf.com?ticket=${username}`
>
<svg
xmlns='http://www.w3.org/2000/svg'
class='icon icon-tabler icon-tabler-logout'
width='24'
height='24'
viewBox='0 0 24 24'
stroke-width='1.5'
strokeWidth='1.5'
stroke='currentColor'
fill='none'
stroke-linecap='round'
stroke-linejoin='round'
strokeLinecap='round'
strokeLinejoin='round'
>
<path stroke='none' d='M0 0h24v24H0z' fill='none'></path>
<path d='M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2'></path>
Expand Down

0 comments on commit 60220f3

Please sign in to comment.