Put commit hash and build time on admin page
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import Layout from '../../components/Layout';
|
||||
import fetchQL from '../../core/fetchQL';
|
||||
import fetch from '../../core/fetch';
|
||||
import { starters, mains } from '../../config';
|
||||
|
||||
const title = 'Admin';
|
||||
@@ -11,7 +12,14 @@ export default {
|
||||
|
||||
async action() {
|
||||
const resp = await fetchQL('{getAllPersons{key,firstname,lastname,email,password,completed,starter,main}}');
|
||||
const configResp = await fetch('/config.json', {
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
});
|
||||
const { data } = await resp.json();
|
||||
const config = await configResp.json();
|
||||
const people = data.getAllPersons || [];
|
||||
|
||||
const food = {
|
||||
@@ -37,6 +45,7 @@ export default {
|
||||
people={people}
|
||||
starters={food.starters}
|
||||
mains={food.mains}
|
||||
build={config.build}
|
||||
/></Layout>,
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user