wealthfolio icon indicating copy to clipboard operation
wealthfolio copied to clipboard

Setup adapters for commands

Open maidh91 opened this issue 5 months ago • 0 comments

Summary

  • Previously, in frontend code, we have centralized all tauri commands into a single dir at src/commands. Now we continue to improve this to centralize all tauri commands into a single file at src/adapters/tauri.ts
  • We also introduce the RUN_ENV enum, and getRunEnv helper to determine the running env, e.g. desktop, browser, mobile
  • This helps cleaning the code with these things
    • preparing for new running env
    • use generic type from invoke function instead of manual type casting

maidh91 avatar Sep 13 '24 00:09 maidh91