Refactor: separera user_measurements och user_strength tabeller

- Ny databasstruktur för historik/progress tracking
- Nya endpoints: POST/GET measurements och strength
- Onboarding sparar till rätt tabeller
- Beräknar och sparar body_fat_pct
- Fixar tomma numeriska fält (null istället för '')
- Döljer 1RM för nybörjare
This commit is contained in:
2026-02-01 00:10:48 +01:00
parent 13ade5e903
commit 14f39e178a
3 changed files with 157 additions and 16 deletions
+3 -1
View File
@@ -64,8 +64,10 @@ export function AuthProvider({ children }) {
setUser(null);
};
const refreshProfile = () => fetchProfile();
return (
<AuthContext.Provider value={{ user, token, loading, register, login, logout, updateProfile }}>
<AuthContext.Provider value={{ user, token, loading, register, login, logout, updateProfile, refreshProfile }}>
{children}
</AuthContext.Provider>
);