mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-02 16:16:02 +00:00
refactor(dropzone): extract DropzoneInner and unify state management with zustand (#165)
Simplified Dropzone implementation by extracting inner logic to a new component, `DropzoneInner`. Replaced local dropzone state logic with centralized state management using zustand. Adjusted API exports and props accordingly for consistency and maintainability.
This commit is contained in:
+5
-1
@@ -51,6 +51,7 @@ if (example) {
|
||||
|
||||
let app: App;
|
||||
const recreate = import.meta.env.VITE_APP_FRESH === "1";
|
||||
const debugRerenders = import.meta.env.VITE_DEBUG_RERENDERS === "1";
|
||||
let firstStart = true;
|
||||
export default {
|
||||
async fetch(request: Request) {
|
||||
@@ -61,7 +62,7 @@ export default {
|
||||
app.emgr.onEvent(
|
||||
App.Events.AppBuiltEvent,
|
||||
async () => {
|
||||
app.registerAdminController({ forceDev: true });
|
||||
app.registerAdminController({ forceDev: true, debugRerenders });
|
||||
app.module.server.client.get("/assets/*", serveStatic({ root: "./" }));
|
||||
},
|
||||
"sync",
|
||||
@@ -73,11 +74,14 @@ export default {
|
||||
// log routes
|
||||
if (firstStart) {
|
||||
firstStart = false;
|
||||
// biome-ignore lint/suspicious/noConsoleLog:
|
||||
console.log("[DB]", credentials);
|
||||
|
||||
if (import.meta.env.VITE_SHOW_ROUTES === "1") {
|
||||
// biome-ignore lint/suspicious/noConsoleLog:
|
||||
console.log("\n[APP ROUTES]");
|
||||
showRoutes(app.server);
|
||||
// biome-ignore lint/suspicious/noConsoleLog:
|
||||
console.log("-------\n");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user