added modal to select source documentation

This commit is contained in:
TaylorS15
2023-02-19 15:26:27 -05:00
parent 63859a814b
commit 5902ca0201
5 changed files with 191 additions and 3 deletions

18
frontend/src/api/docs.ts Normal file
View File

@@ -0,0 +1,18 @@
import { Doc } from '../models/misc';
export async function getDocs(): Promise<Array<Doc>> {
//Fetch default source docs
const response = await fetch(
'https://d3dg1063dc54p9.cloudfront.net/combined.json',
);
const data = await response.json();
//Create array of Doc objects
const docs: Array<Doc> = [];
data.forEach((doc: Doc) => {
docs.push(doc);
});
return docs;
}