mirror of
https://github.com/snowball-tools/snowballtools-base.git
synced 2025-07-30 02:22:06 +00:00
remove frontend
This commit is contained in:
parent
df3ec7a3bf
commit
043a870b33
@ -111,6 +111,7 @@ export const createAndStartServer = async (
|
|||||||
app.use('/auth', authRouter);
|
app.use('/auth', authRouter);
|
||||||
app.use('/api/github', githubRouter);
|
app.use('/api/github', githubRouter);
|
||||||
app.use('/staging', stagingRouter);
|
app.use('/staging', stagingRouter);
|
||||||
|
|
||||||
httpServer.listen(port, host, () => {
|
httpServer.listen(port, host, () => {
|
||||||
log(`Server is listening on ${host}:${port}${server.graphqlPath}`);
|
log(`Server is listening on ${host}:${port}${server.graphqlPath}`);
|
||||||
});
|
});
|
||||||
|
@ -1,35 +1,7 @@
|
|||||||
import { CloudyFlow } from 'components/CloudyFlow';
|
import { CloudyFlow } from 'components/CloudyFlow';
|
||||||
import { SnowballAuth } from './auth/SnowballAuth';
|
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 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 (
|
return (
|
||||||
<CloudyFlow className="flex flex-col min-h-screen">
|
<CloudyFlow className="flex flex-col min-h-screen">
|
||||||
<div className="py-8 relative z-10">
|
<div className="py-8 relative z-10">
|
||||||
@ -49,11 +21,6 @@ const AuthPage = () => {
|
|||||||
<SnowballAuth />
|
<SnowballAuth />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{IS_STAGING == 'YES' && (
|
|
||||||
<div className="p-4 text-center">
|
|
||||||
<span>Version: {version}</span>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</CloudyFlow>
|
</CloudyFlow>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user