// Copyright (c) 2017 PlanGrid, Inc. import React, { useState } from "react"; import "../../styles/video.scss"; import { Loading } from "../Loading"; interface IAudioViewerProps { fileType: string; filePath: string; errorComponent?: React.ReactElement; } export const AudioViewer: React.FunctionComponent = ( props ) => { const [loading, setLoading] = useState(true); const [error, setError] = useState | null>(null); return error ? ( props.errorComponent ) : (
{loading ? : null}
); };