prod build fixing

This commit is contained in:
2025-09-16 10:54:41 +02:00
parent c7d1251ad3
commit e18a652d7a
4 changed files with 70 additions and 1758 deletions

View File

@@ -23,6 +23,8 @@ ENV NEXT_TELEMETRY_DISABLED=1
ENV NODE_ENV=production ENV NODE_ENV=production
# Build the application using npm only # Build the application using npm only
RUN npm install
RUN npm install autoprefixer
RUN npm run build RUN npm run build
# Production image, copy all the files and run next # Production image, copy all the files and run next

File diff suppressed because it is too large Load Diff

View File

@@ -57,7 +57,6 @@
"@types/node": "^20.10.0", "@types/node": "^20.10.0",
"@types/react": "^18.2.39", "@types/react": "^18.2.39",
"@types/react-dom": "^18.2.17", "@types/react-dom": "^18.2.17",
"autoprefixer": "^10.4.16",
"eslint": "^8.54.0", "eslint": "^8.54.0",
"eslint-config-next": "14.0.4", "eslint-config-next": "14.0.4",
"postcss": "^8.4.32", "postcss": "^8.4.32",

View File

@@ -27,15 +27,17 @@ export default function TestAuthPage() {
const expiry = tokenManager.getTokenExpiry() const expiry = tokenManager.getTokenExpiry()
const refreshExpiry = tokenManager.getRefreshTokenExpiry() const refreshExpiry = tokenManager.getRefreshTokenExpiry()
if (!expiry) return "No token" if (!expiry.access_token_expiry) return "No token"
const now = new Date() const now = new Date()
const timeUntilExpiry = Math.floor((expiry.getTime() - now.getTime()) / 1000) const accessTimeUntilExpiry = Math.floor((expiry.access_token_expiry - now.getTime() / 1000))
const refreshTimeUntilExpiry = refreshExpiry ? Math.floor((refreshExpiry - now.getTime() / 1000)) : null
return ` return `
Token expires in: ${Math.floor(timeUntilExpiry / 60)} minutes ${timeUntilExpiry % 60} seconds Access token expires in: ${Math.floor(accessTimeUntilExpiry / 60)} minutes ${accessTimeUntilExpiry % 60} seconds
Access token expiry: ${expiry.toLocaleString()} Refresh token expires in: ${refreshTimeUntilExpiry ? `${Math.floor(refreshTimeUntilExpiry / 60)} minutes ${refreshTimeUntilExpiry % 60} seconds` : 'N/A'}
Refresh token expiry: ${refreshExpiry?.toLocaleString() || 'N/A'} Access token expiry: ${new Date(expiry.access_token_expiry * 1000).toLocaleString()}
Refresh token expiry: ${refreshExpiry ? new Date(refreshExpiry * 1000).toLocaleString() : 'N/A'}
Authenticated: ${tokenManager.isAuthenticated()} Authenticated: ${tokenManager.isAuthenticated()}
` `
} }