feat: add error boundary and loading spinner components with SWR integration
This commit is contained in:
@@ -2136,3 +2136,61 @@ textarea:focus-visible {
|
||||
min-height: 54px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Error Boundary */
|
||||
.error-boundary {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 100vh;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.error-boundary__content {
|
||||
text-align: center;
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
.error-boundary__content h2 {
|
||||
margin: 16px 0 8px;
|
||||
color: #1e293b;
|
||||
}
|
||||
|
||||
.error-boundary__content p {
|
||||
color: #64748b;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.error-boundary__details {
|
||||
background: #f1f5f9;
|
||||
padding: 12px;
|
||||
border-radius: 8px;
|
||||
font-size: 12px;
|
||||
color: #64748b;
|
||||
margin-bottom: 24px;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.error-boundary__actions {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* Loading Spinner */
|
||||
.loading-spinner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
padding: 20px;
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
.is-spinning {
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user