feat: Implement subscription management and article saving features
- Added subscriptionPlan and subscriptionExpiresAt fields to UserProfile model. - Enhanced profile routes to handle subscription state updates and expiration logic. - Introduced email and password validation during user registration. - Implemented link stripping for processed articles in the articles route. - Added save article functionality with appropriate UI feedback in the frontend. - Updated AccountSettings and FeedContent components to reflect subscription state and saved articles. - Improved error handling and local storage management for user preferences.
This commit is contained in:
@@ -39,6 +39,13 @@ function RegisterPage({ onRegisterSuccess }: RegisterPageProps) {
|
||||
// ignore parsing errors
|
||||
}
|
||||
|
||||
// Basic email format validation on client
|
||||
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/
|
||||
if (!emailRegex.test(String(email).toLowerCase())) {
|
||||
setError('Formato email non valido.')
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
await register({
|
||||
email,
|
||||
|
||||
Reference in New Issue
Block a user