remove frontend

This commit is contained in:
Vivian Phung 2024-06-05 17:32:39 +01:00
parent df3ec7a3bf
commit 043a870b33
No known key found for this signature in database
2 changed files with 1 additions and 33 deletions

View File

@ -111,6 +111,7 @@ export const createAndStartServer = async (
app.use('/auth', authRouter);
app.use('/api/github', githubRouter);
app.use('/staging', stagingRouter);
httpServer.listen(port, host, () => {
log(`Server is listening on ${host}:${port}${server.graphqlPath}`);
});

View File

@ -1,35 +1,7 @@
import { CloudyFlow } from 'components/CloudyFlow';
import { SnowballAuth } from './auth/SnowballAuth';
import { useEffect, useState } from 'react';
const baseUrl = import.meta.env.VITE_SERVER_URL;
const IS_STAGING = import.meta.env.VITE_IS_STAGING;
const AuthPage = () => {
const [version, setVersion] = useState('');
async function getVersion() {
const res = await fetch(`${baseUrl}/staging/version`);
if (res.status == 200) {
const queriedVersion = (await res.json()).version;
console.log('v: ', queriedVersion);
if (queriedVersion) {
setVersion(queriedVersion);
}
} else if (res.status === 204) {
return null;
} else {
throw new Error(
`Unexpected response from staging version endpoint: ${res.status}: ${await res.text()}`,
);
}
}
useEffect(() => {
getVersion();
}, []);
return (
<CloudyFlow className="flex flex-col min-h-screen">
<div className="py-8 relative z-10">
@ -49,11 +21,6 @@ const AuthPage = () => {
<SnowballAuth />
</div>
</div>
{IS_STAGING == 'YES' && (
<div className="p-4 text-center">
<span>Version: {version}</span>
</div>
)}
</CloudyFlow>
);
};