Skip to content

Commit

Permalink
console: Fix code quality errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ryaplots committed Feb 5, 2024
1 parent f2d5df8 commit 03075a1
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 12 deletions.
1 change: 0 additions & 1 deletion config/storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import messages from '@ttn-lw/locales/en.json'
import backendMessages from '@ttn-lw/locales/.backend/en.json'

import '../../pkg/webui/styles/main.styl'
import '../../pkg/webui/styles/utilities/color.styl'
import '../../pkg/webui/styles/utilities/general.styl'
import '../../pkg/webui/styles/utilities/spacing.styl'
import 'focus-visible/dist/focus-visible'
Expand Down
5 changes: 4 additions & 1 deletion pkg/webui/account/containers/collaborators-table/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ const CollaboratorsTable = props => {
return (
<span>
{collaboratorId}{' '}
<Message className="c-text-neutral-light" content={sharedMessages.currentUserIndicator} />
<Message
className="c-text-neutral-light"
content={sharedMessages.currentUserIndicator}
/>
</span>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,11 @@ const ApplicationGeneralSettingsForm = ({
isResctrictedUser={isResctrictedUser}
userId={userId}
/>
<Message content={m.techContactDescription} component="p" className="mt-cs-xs c-text-neutral-light" />
<Message
content={m.techContactDescription}
component="p"
className="mt-cs-xs c-text-neutral-light"
/>
<SubmitBar>
<Form.Submit component={SubmitButton} message={sharedMessages.saveChanges} />
<Require featureCheck={mayDeleteApplication}>
Expand Down
5 changes: 4 additions & 1 deletion pkg/webui/console/components/routing-policy/sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ const RoutingPolicy = ({ enabled, message, positiveMessage, negativeMessage }) =
<span className={style.policy} data-enabled={enabled}>
<Icon
icon={enabled ? 'check' : 'clear'}
className={classnames('mr-cs-xxs', { 'c-bg-success-normal': enabled, 'c-bg-error-normal': !enabled })}
className={classnames('mr-cs-xxs', {
'c-bg-success-normal': enabled,
'c-bg-error-normal': !enabled,
})}
/>
<Message content={message} />
</span>
Expand Down
5 changes: 4 additions & 1 deletion pkg/webui/console/containers/collaborators-table/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ const CollaboratorsTable = props => {
userLabel = (
<span>
{collaboratorId}{' '}
<Message className="c-text-neutral-light" content={sharedMessages.currentUserIndicator} />
<Message
className="c-text-neutral-light"
content={sharedMessages.currentUserIndicator}
/>
</span>
)
}
Expand Down
16 changes: 14 additions & 2 deletions pkg/webui/console/containers/device-title-section/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,13 @@ const DeviceTitleSection = props => {
}
>
<LastSeen lastSeen={lastSeen} flipped noTitle>
<Icon icon="help_outline" textPaddedLeft small nudgeUp className="c-text-neutral-light" />
<Icon
icon="help_outline"
textPaddedLeft
small
nudgeUp
className="c-text-neutral-light"
/>
</LastSeen>
</DocTooltip>
) : (
Expand All @@ -103,7 +109,13 @@ const DeviceTitleSection = props => {
content={<Message content={m.noActivityTooltip} />}
>
<Status status="mediocre" label={sharedMessages.noActivityYet} flipped>
<Icon icon="help_outline" textPaddedLeft small nudgeUp className="c-text-neutral-light" />
<Icon
icon="help_outline"
textPaddedLeft
small
nudgeUp
className="c-text-neutral-light"
/>
</Status>
</DocTooltip>
)}
Expand Down
8 changes: 7 additions & 1 deletion pkg/webui/console/containers/devices-table/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,13 @@ const headers = [
placement="top-end"
>
<Status status="unknown" label={sharedMessages.otherCluster}>
<Icon icon="help_outline" textPaddedLeft small nudgeUp className="c-text-neutral-light" />
<Icon
icon="help_outline"
textPaddedLeft
small
nudgeUp
className="c-text-neutral-light"
/>
</Status>
</DocTooltip>
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/webui/lib/hooks/use-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ const useRequest = (requestAction, requestOnChange) => {
requestAction instanceof Array
? Promise.all(requestAction.map(req => dispatch(attachPromise(req))))
: typeof requestAction === 'function'
? requestAction(dispatch)
: dispatch(attachPromise(requestAction))
? requestAction(dispatch)
: dispatch(attachPromise(requestAction))

promise
.then(result => {
Expand Down
4 changes: 2 additions & 2 deletions pkg/webui/styles/variables/colors.styl
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// CONSOLE COLOR PALLETE
// CONSOLE COLOR PALETTE
// =====================
// This file contains the color pallete for the console. It is meant to
// This file contains the color palette for the console. It is meant to
// be used only by the tokens.styl file to define design tokens with it.
// Do not use these values directly but only through the tokens.styl file.

Expand Down

0 comments on commit 03075a1

Please sign in to comment.