Migrate project from Vue to React and TypeScript

This commit is contained in:
2025-06-13 23:02:08 -07:00
parent 9e1bb74656
commit 43ceca86e0
52 changed files with 1436 additions and 3320 deletions

View File

@@ -1,12 +0,0 @@
//go:build !prod
package main
import (
"io/fs"
"os"
)
func getUIAssets() fs.FS {
return os.DirFS("ui/dist")
}

View File

@@ -1,12 +0,0 @@
//go:build prod
package main
import (
"github.com/smjklake/glancr/ui"
"io/fs"
)
func getUIAssets() fs.FS {
return ui.GetUIFS()
}

View File

@@ -6,10 +6,12 @@ import (
"os"
"path"
"strings"
"github.com/smjklake/glancr/internal/fs"
)
func spaHandler() http.HandlerFunc {
fs := getUIAssets()
fs := fs.GetUIAssets()
fileServer := http.FileServer(http.FS(fs))
return func(w http.ResponseWriter, r *http.Request) {