Skip to content

Commit

Permalink
Update LanguageSwitcher.js
Browse files Browse the repository at this point in the history
  • Loading branch information
guibranco authored Jul 16, 2024
1 parent 594206e commit 4f48b66
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/Components/LanguageSwitcher.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import React from "react";
import { useTranslation } from "react-i18next";

const LanguageSwitcher = () => {
const { i18n } = useTranslation();
Expand All @@ -9,9 +9,10 @@ const LanguageSwitcher = () => {

return (
<div>
<button onClick={() => changeLanguage('en')}>English</button>
<button onClick={() => changeLanguage('es')}>Español</button>
<button onClick={() => changeLanguage("pt")}>Português</button>

Check notice on line 12 in src/Components/LanguageSwitcher.js

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/Components/LanguageSwitcher.js#L12

disallow literal string: <button onClick={() => changeLanguage("pt")}>Português</button>
<button onClick={() => changeLanguage("en")}>English</button>

Check notice on line 13 in src/Components/LanguageSwitcher.js

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/Components/LanguageSwitcher.js#L13

disallow literal string: <button onClick={() => changeLanguage("en")}>English</button>
<button onClick={() => changeLanguage("es")}>Español</button>

Check notice on line 14 in src/Components/LanguageSwitcher.js

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/Components/LanguageSwitcher.js#L14

disallow literal string: <button onClick={() => changeLanguage("es")}>Español</button>
</div>
);
}

Check notice on line 17 in src/Components/LanguageSwitcher.js

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/Components/LanguageSwitcher.js#L17

Insert `;`
export default LanguageSwitcher;
export default LanguageSwitcher;

0 comments on commit 4f48b66

Please sign in to comment.