fix data type
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
ccd075fa84
commit
00caa70143
14
lib/team.ts
14
lib/team.ts
|
@ -88,13 +88,11 @@ export async function getExecNamePosPairs() {
|
||||||
return formattedExec;
|
return formattedExec;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getExec(execNamePosPair: string[], convert = true) {
|
export async function getExec(name: string, pos: string, convert = true) {
|
||||||
let content, metadata;
|
let content, metadata;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const raw = await readFile(
|
const raw = await readFile(path.join(EXECS_PATH, `${name}${fileType}`));
|
||||||
path.join(EXECS_PATH, `${execNamePosPair[0]}${fileType}`)
|
|
||||||
);
|
|
||||||
({ content, data: metadata } = matter(raw));
|
({ content, data: metadata } = matter(raw));
|
||||||
|
|
||||||
const image =
|
const image =
|
||||||
|
@ -107,13 +105,11 @@ export async function getExec(execNamePosPair: string[], convert = true) {
|
||||||
};
|
};
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
const firstName =
|
const firstName =
|
||||||
execNamePosPair[0].split("-")[0][0].toUpperCase() +
|
name.split("-")[0][0].toUpperCase() + name.split("-")[0].slice(1);
|
||||||
execNamePosPair[0].split("-")[0].slice(1);
|
|
||||||
const lastName =
|
const lastName =
|
||||||
execNamePosPair[0].split("-")[1][0].toUpperCase() +
|
name.split("-")[1][0].toUpperCase() + name.split("-")[1].slice(1);
|
||||||
execNamePosPair[0].split("-")[1].slice(1);
|
|
||||||
|
|
||||||
const posName = execPositions[execNamePosPair[1]];
|
const posName = execPositions[pos];
|
||||||
({ content, metadata } = {
|
({ content, metadata } = {
|
||||||
content: "Coming soon!",
|
content: "Coming soon!",
|
||||||
metadata: {
|
metadata: {
|
||||||
|
|
|
@ -211,7 +211,7 @@ export const getStaticProps: GetStaticProps<Props> = async () => {
|
||||||
const execNamePosPairs = await getExecNamePosPairs();
|
const execNamePosPairs = await getExecNamePosPairs();
|
||||||
|
|
||||||
const execs = (await Promise.all(
|
const execs = (await Promise.all(
|
||||||
execNamePosPairs.map((namePosPair) => getExec(namePosPair))
|
execNamePosPairs.map((posPairs) => getExec(posPairs[0], posPairs[1]))
|
||||||
)) as SerializedExec[];
|
)) as SerializedExec[];
|
||||||
|
|
||||||
const [
|
const [
|
||||||
|
|
Loading…
Reference in New Issue