@liiift-studio/sales-portal 1.8.0 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -123,18 +123,17 @@ export default function LoginForm({
123
123
  <Box sx={{
124
124
  flex: 1,
125
125
  pt: { xs: 4, sm: 6 },
126
- pr: { xs: 4, sm: 6 },
127
126
  pb: 0,
128
- pl: 0,
127
+ px: 0,
129
128
  display: 'flex',
130
129
  flexDirection: 'column',
131
- justifyContent: 'center',
130
+ justifyContent: 'space-between',
132
131
  }}>
133
- <Typography component="span" variant="h2" sx={{ mb: 5, display: 'block', pl: { xs: 4, sm: 6 } }}>
132
+ <Typography component="span" variant="h2" sx={{ mb: 5, display: 'block', px: { xs: 4, sm: 6 } }}>
134
133
  {title}
135
134
  </Typography>
136
135
 
137
- <Box sx={{ pl: { xs: 4, sm: 6 } }}>
136
+ <Box sx={{ px: { xs: 4, sm: 6 } }}>
138
137
  <Input
139
138
  placeholder="Email"
140
139
  onChange={(e) => setUser(e.target.value)}
@@ -205,7 +204,7 @@ export default function LoginForm({
205
204
  fullWidth
206
205
  sx={{
207
206
  m: 0,
208
- mt: 'auto',
207
+ mt: '1em',
209
208
  border: 'none',
210
209
  typography: 'h4',
211
210
  color: 'var(--black)',
@@ -214,6 +213,7 @@ export default function LoginForm({
214
213
  alignItems: 'center',
215
214
  bgcolor: 'var(--green)',
216
215
  minHeight: '64px',
216
+ maxWidth: 'initial',
217
217
  borderRadius: '0 0 0 12px',
218
218
  opacity: 1,
219
219
  flexShrink: 0,
@@ -151,12 +151,15 @@ export default function Sales(props) {
151
151
  }
152
152
  }, [date, designer?.admin, month, year, updateDate]);
153
153
 
154
+ // Status codes worth retrying (rate limit and transient server errors)
155
+ const RETRYABLE_STATUSES = [429, 500];
156
+
154
157
  // Fetch with retry logic for rate-limited and network errors
155
158
  async function fetchWithRetry(url, options, label, attempt = 0) {
156
159
  try {
157
160
  const response = await fetch(url, options);
158
161
 
159
- if (!response.ok && attempt < MAX_RETRIES) {
162
+ if (!response.ok && attempt < MAX_RETRIES && RETRYABLE_STATUSES.includes(response.status)) {
160
163
  const delay = Math.pow(2, attempt) * 1000 + Math.random() * 500;
161
164
  setRetryInfo({ retrying: true, attempt: attempt + 1, label });
162
165
  await new Promise(resolve => setTimeout(resolve, delay));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liiift-studio/sales-portal",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "Centralized sales portal package for Liiift Studio projects",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",