making ready for production, fixing app menu spacing, some better icons
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import Socket from "/_/code/ws/Socket.js"
|
||||
import "./Home.js"
|
||||
import "./Home/Home.js"
|
||||
import "./Home/Login.js"
|
||||
import "./Home/ConnectionError.js"
|
||||
const env = import.meta.env
|
||||
|
||||
let Global = class {
|
||||
Socket = new Socket()
|
||||
@@ -31,7 +32,7 @@ let Global = class {
|
||||
async fetchAppData() {
|
||||
let personalSpace = this.currentNetwork === this.profile
|
||||
if (personalSpace) { return {} }
|
||||
let appData = await fetch(`/api/${personalSpace ? "my" : "org"}data/` + this.currentNetwork.id, {method: "GET"})
|
||||
let appData = await fetch(`${env.VITE_API_URL}/api/${personalSpace ? "my" : "org"}data/` + this.currentNetwork.id, {method: "GET"})
|
||||
let json = await appData.json()
|
||||
return json
|
||||
}
|
||||
@@ -116,8 +117,9 @@ let Global = class {
|
||||
}
|
||||
|
||||
async getProfile() {
|
||||
console.log(env)
|
||||
try {
|
||||
const res = await fetch("/profile", {
|
||||
const res = await fetch(`${env.VITE_API_URL}/profile`, {
|
||||
method: "GET",
|
||||
credentials: "include",
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user