-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create status page PR2 #1494
Create status page PR2 #1494
Changes from 41 commits
136ed04
4345d69
5adffd8
2405d01
8506291
df36f87
5df7ddb
0759b16
cc2187d
b275bdc
35a981a
b651369
cbec5fd
2825ff4
03ce805
b1f0568
1ab4bd7
9370db6
00be6c2
c61d1ac
9d212c9
fdca92e
406fa6e
c1dc049
8292654
5045eaf
219bcd4
c9b804a
3a00742
11154ad
feaf1e3
c535a6f
d844078
23d97f8
a5df7be
d8da182
1206451
8b72f84
5226f3c
a544a0f
ff7fe7f
e8d9f31
a1d4ec4
df4a7f6
df86c92
6f4c606
b5409f0
e8a9c0d
642c5f0
045a9cf
f0352cc
dba8517
66325bd
083a134
b7a70c4
12b14e1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
VITE_APP_API_BASE_URL=UPTIME_APP_API_BASE_URL | ||
VITE_STATUS_PAGE_SUBDOMAIN_PREFIX=UPTIME_STATUS_PAGE_SUBDOMAIN_PREFIX |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -54,6 +54,8 @@ const Search = ({ | |||||
isAdorned = true, | ||||||
error, | ||||||
disabled, | ||||||
startAdornment, | ||||||
endAdornment | ||||||
}) => { | ||||||
const theme = useTheme(); | ||||||
|
||||||
|
@@ -66,15 +68,15 @@ const Search = ({ | |||||
onInputChange={(_, newValue) => { | ||||||
handleInputChange(newValue); | ||||||
}} | ||||||
onChange={(_, newValue) => { | ||||||
handleChange && handleChange(newValue); | ||||||
onChange={(e, newValue) => { | ||||||
handleChange && handleChange(e, newValue); | ||||||
}} | ||||||
fullWidth | ||||||
freeSolo | ||||||
disabled={disabled} | ||||||
disableClearable | ||||||
options={options} | ||||||
getOptionLabel={(option) => option[filteredBy]} | ||||||
getOptionLabel={(option) => option[filteredBy]??""} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't let your code slip, mom's spaghetti! 🍝 Improve null checking in getOptionLabel: -getOptionLabel={(option) => option[filteredBy]??""}
+getOptionLabel={(option) => option?.[filteredBy] ?? ""} 📝 Committable suggestion
Suggested change
|
||||||
renderInput={(params) => ( | ||||||
<Stack> | ||||||
<Typography | ||||||
|
@@ -89,9 +91,13 @@ const Search = ({ | |||||
{...params} | ||||||
error={Boolean(error)} | ||||||
placeholder="Type to search" | ||||||
InputProps={{ | ||||||
...params.InputProps, | ||||||
...(isAdorned && { startAdornment: <SearchAdornment /> }), | ||||||
slotProps={{ | ||||||
input: { | ||||||
...params.InputProps, | ||||||
...(isAdorned && { startAdornment: <SearchAdornment /> }), | ||||||
...(startAdornment && { startAdornment: startAdornment }), | ||||||
...(endAdornment && { endAdornment: endAdornment }), | ||||||
}, | ||||||
}} | ||||||
sx={{ | ||||||
"& fieldset": { | ||||||
|
@@ -188,14 +194,16 @@ Search.propTypes = { | |||||
options: PropTypes.array.isRequired, | ||||||
filteredBy: PropTypes.string.isRequired, | ||||||
secondaryLabel: PropTypes.string, | ||||||
value: PropTypes.array, | ||||||
value: PropTypes.oneOfType([PropTypes.array, PropTypes.object]), | ||||||
inputValue: PropTypes.string.isRequired, | ||||||
handleInputChange: PropTypes.func.isRequired, | ||||||
handleChange: PropTypes.func, | ||||||
isAdorned: PropTypes.bool, | ||||||
sx: PropTypes.object, | ||||||
error: PropTypes.string, | ||||||
disabled: PropTypes.bool, | ||||||
startAdornment: PropTypes.object, | ||||||
endAdornment: PropTypes.object | ||||||
}; | ||||||
|
||||||
export default Search; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Possible JSDoc mismatch
This line's documentation calls
isRound
a string, but it is declared and used as a boolean. Updating the JSDoc to reflect a boolean type prevents confusion.📝 Committable suggestion