mirror of
https://github.com/Xevion/dynamic-preauth.git
synced 2025-12-05 23:14:53 -06:00
fix process.env/import.meta.env usages, TODO linting, fix Emboldened hexadecimal null handling
This commit is contained in:
@@ -4,14 +4,16 @@ import tailwind from "@astrojs/tailwind";
|
||||
import sitemap from "@astrojs/sitemap";
|
||||
import preact from "@astrojs/preact";
|
||||
|
||||
// TODO: Add linting to build steps
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
build: {
|
||||
assets: "assets",
|
||||
},
|
||||
site: process.env.DEV
|
||||
site: import.meta.env.DEV
|
||||
? "https://localhost:4321"
|
||||
: `https://${process.env.RAILWAY_PUBLIC_DOMAIN}`,
|
||||
: `https://${import.meta.env.RAILWAY_PUBLIC_DOMAIN}`,
|
||||
integrations: [
|
||||
tailwind(),
|
||||
sitemap({
|
||||
@@ -20,7 +22,7 @@ export default defineConfig({
|
||||
// xslURL: "/sitemap.xsl",
|
||||
}),
|
||||
preact({
|
||||
devtools: process.env.DEV != undefined ? true : false,
|
||||
devtools: import.meta.DEV ?? false,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
@@ -41,8 +41,8 @@ const Demo = ({ class: className }: DemoProps) => {
|
||||
session.
|
||||
<br />
|
||||
Your session is{" "}
|
||||
<Emboldened skeletonWidth="0x12345678" copyable={true}>
|
||||
{"0x" + id?.toString(16).toUpperCase()}
|
||||
<Emboldened skeletonWidth="0x1234567890ABCDEF" copyable={true}>
|
||||
{id != null ? "0x" + id?.toString(16).toUpperCase() : null}
|
||||
</Emboldened>
|
||||
. You have{" "}
|
||||
<Emboldened className="text-teal-400 font-inter">
|
||||
|
||||
@@ -30,9 +30,7 @@ function useSocket(): UseSocketResult {
|
||||
useEffect(() => {
|
||||
const socket = new WebSocket(
|
||||
(window.location.protocol === "https:" ? "wss://" : "ws://") +
|
||||
(import.meta.env.DEV != undefined
|
||||
? "localhost:5800"
|
||||
: window.location.host) +
|
||||
(import.meta.env.DEV ? "localhost:5800" : window.location.host) +
|
||||
"/ws"
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user