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