Tasks page implementation (#120)
This commit is contained in:
25
skyvern-frontend/src/util/env.ts
Normal file
25
skyvern-frontend/src/util/env.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
const apiBaseUrl = import.meta.env.VITE_API_BASE_URL as string;
|
||||
|
||||
if (!apiBaseUrl) {
|
||||
console.error("apiBaseUrl environment variable was not set");
|
||||
}
|
||||
|
||||
const environment = import.meta.env.VITE_ENVIRONMENT as string;
|
||||
|
||||
if (!environment) {
|
||||
console.error("environment environment variable was not set");
|
||||
}
|
||||
|
||||
const credential = import.meta.env.VITE_API_CREDENTIAL as string;
|
||||
|
||||
if (!credential) {
|
||||
console.error("credential environment variable was not set");
|
||||
}
|
||||
|
||||
const artifactApiBaseUrl = import.meta.env.VITE_ARTIFACT_API_BASE_URL as string;
|
||||
|
||||
if (!artifactApiBaseUrl) {
|
||||
console.error("artifactApiBaseUrl environment variable was not set");
|
||||
}
|
||||
|
||||
export { apiBaseUrl, environment, credential, artifactApiBaseUrl };
|
||||
13
skyvern-frontend/src/util/timeFormat.ts
Normal file
13
skyvern-frontend/src/util/timeFormat.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
function basicTimeFormat(time: string): string {
|
||||
const date = new Date(time);
|
||||
const dateString = date.toLocaleDateString("en-us", {
|
||||
weekday: "long",
|
||||
year: "numeric",
|
||||
month: "short",
|
||||
day: "numeric",
|
||||
});
|
||||
const timeString = date.toLocaleTimeString("en-us");
|
||||
return `${dateString} at ${timeString}`;
|
||||
}
|
||||
|
||||
export { basicTimeFormat };
|
||||
Reference in New Issue
Block a user