Skip to content

Commit

Permalink
#11 fix(frontend): fix Sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaBuffy committed Dec 17, 2024
1 parent ad69968 commit 876759a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/ui/inputs/LabeledTextInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const props = defineProps<{

<template>
<div class="flex flex-col">
<label v-if="props.label" :id="props.id" class="body-2 text-color mb-3">
<label v-if="props.label" :for="props.id" :id="props.id" class="body-2 text-color mb-3">
{{ props.label }}
</label>

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ui/inputs/SwitchInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const handleToggleSwitchOnEnter = (event: KeyboardEvent) => {
<!--switch-->
<div
role="switch"
:aria-checked="!!props.value"
:aria-checked="props.value"
:aria-label="'Switch ' + (props.value ? 'checked' : 'not checked')"
class="relative flex select-none outline-none transition-all duration-200 ease-in"
tabindex="0"
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/store/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
export const fetchData = async () => {
await delay(2000);

return await {
return {
data: {
user: user,
conversations: conversations,
Expand All @@ -1045,7 +1045,7 @@ export const fetchData = async () => {
export const updateAccount = async () => {
await delay(4000);

return await {
return {
data: {
detail: "Your account has been updated successfully",
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/store/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import type {

const useStore = defineStore("chat", () => {
// local storage
const storage = JSON.parse(localStorage.getItem("chat") || "{}");
const storage = JSON.parse(localStorage.getItem("chat") ?? "{}");

// app status refs
const status = ref("idle");
Expand Down

0 comments on commit 876759a

Please sign in to comment.