'use client'; import React from 'react'; import styles from './audio.module.css'; type Display = 'text' | 'button'; export default function AudioButton({ file, text, type }: { file: string, text: string, type: Display }) { const audio: HTMLAudioElement = new Audio('/public/audio/1.ogg') if (audio === null) { console.log('uhoh') } const id = `audio-${new Date().getTime()}` function makeAudio() { if (type == 'text') { return (
{text} {/*
); } else if (type == 'button') { return (
{/*
); } return null; } return makeAudio(); }