fix: language selector is now working properly
This commit is contained in:
parent
cb79da4b18
commit
078b11afff
@ -37,7 +37,7 @@ function App() {
|
|||||||
</HashRouter>
|
</HashRouter>
|
||||||
<footer>
|
<footer>
|
||||||
<p>© 2025 GivFNZ</p>
|
<p>© 2025 GivFNZ</p>
|
||||||
<p>Version: 1.1.10</p>
|
<p>Version: 1.1.11</p>
|
||||||
</footer>
|
</footer>
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
);
|
);
|
||||||
|
@ -2,11 +2,12 @@ import { HashRouter } from "react-router-dom";
|
|||||||
import { HeaderContainer, NavLink, HomeLink, LanguageSelector } from "./styles";
|
import { HeaderContainer, NavLink, HomeLink, LanguageSelector } from "./styles";
|
||||||
import { AvatarHeader } from "../Avatar/avatar";
|
import { AvatarHeader } from "../Avatar/avatar";
|
||||||
import i18n from "../../utils/i18n";
|
import i18n from "../../utils/i18n";
|
||||||
import { t } from "i18next";
|
|
||||||
import { Drawer, DrawerContainer, DrawerItem } from "../Drawer/styles";
|
import { Drawer, DrawerContainer, DrawerItem } from "../Drawer/styles";
|
||||||
import useDrawerVisible from "../../hooks/useDrawerVisible";
|
import useDrawerVisible from "../../hooks/useDrawerVisible";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
export default function Header() {
|
export default function Header() {
|
||||||
|
const { t } = useTranslation();
|
||||||
const changeLanguage = (event: React.ChangeEvent<HTMLSelectElement>) => {
|
const changeLanguage = (event: React.ChangeEvent<HTMLSelectElement>) => {
|
||||||
i18n.changeLanguage(event.target.value);
|
i18n.changeLanguage(event.target.value);
|
||||||
localStorage.setItem("language", event.target.value);
|
localStorage.setItem("language", event.target.value);
|
||||||
|
@ -3,9 +3,10 @@ import { Button, TextArea } from './styles';
|
|||||||
import { MainContainer } from '../../components/MainContent/styles';
|
import { MainContainer } from '../../components/MainContent/styles';
|
||||||
import { Send } from 'lucide-react';
|
import { Send } from 'lucide-react';
|
||||||
import { Paragraph } from '../../components/Paragraph/styles';
|
import { Paragraph } from '../../components/Paragraph/styles';
|
||||||
import { t } from 'i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
export default function Contact() {
|
export default function Contact() {
|
||||||
|
const { t } = useTranslation();
|
||||||
const emailAddress = import.meta.env.VITE_GIV_EMAIL;
|
const emailAddress = import.meta.env.VITE_GIV_EMAIL;
|
||||||
const [typedText, setTypedText] = useState('');
|
const [typedText, setTypedText] = useState('');
|
||||||
|
|
||||||
|
@ -5,10 +5,12 @@ import { faTelegram, faGithub } from '@fortawesome/free-brands-svg-icons';
|
|||||||
import { IconContainer, IconLink, HomeLabel, TopSection } from './styles';
|
import { IconContainer, IconLink, HomeLabel, TopSection } from './styles';
|
||||||
import { MainContainer } from '../../components/MainContent/styles';
|
import { MainContainer } from '../../components/MainContent/styles';
|
||||||
import { Avatar } from '../../components/Avatar/avatar';
|
import { Avatar } from '../../components/Avatar/avatar';
|
||||||
import { t } from 'i18next';
|
|
||||||
import { Paragraph } from '../../components/Paragraph/styles';
|
import { Paragraph } from '../../components/Paragraph/styles';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import i18n from '../../utils/i18n';
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
|
const { t } = useTranslation();
|
||||||
const typedElement = useRef(null);
|
const typedElement = useRef(null);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -22,7 +24,7 @@ export default function Home() {
|
|||||||
return () => {
|
return () => {
|
||||||
typed.destroy();
|
typed.destroy();
|
||||||
};
|
};
|
||||||
}, []);
|
}, [i18n.language]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MainContainer>
|
<MainContainer>
|
||||||
|
@ -10,7 +10,7 @@ import {
|
|||||||
ProjectStars,
|
ProjectStars,
|
||||||
} from './styles';
|
} from './styles';
|
||||||
import { MainContainer } from '../../components/MainContent/styles';
|
import { MainContainer } from '../../components/MainContent/styles';
|
||||||
import { t } from 'i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
interface Repo {
|
interface Repo {
|
||||||
name: string;
|
name: string;
|
||||||
@ -21,6 +21,7 @@ interface Repo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function Projects() {
|
export default function Projects() {
|
||||||
|
const { t } = useTranslation();
|
||||||
const [projects, setProjects] = useState<Repo[]>([]);
|
const [projects, setProjects] = useState<Repo[]>([]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -2,9 +2,10 @@ import { MainContainer } from "../../components/MainContent/styles";
|
|||||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||||
import { faAndroid, faAngular, faGit, faLinux, faNode, faReact, faWindows } from '@fortawesome/free-brands-svg-icons'
|
import { faAndroid, faAngular, faGit, faLinux, faNode, faReact, faWindows } from '@fortawesome/free-brands-svg-icons'
|
||||||
import { SkillsContainer } from "./styles";
|
import { SkillsContainer } from "./styles";
|
||||||
import { t } from "i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
export default function Skills() {
|
export default function Skills() {
|
||||||
|
const { t } = useTranslation();
|
||||||
return (
|
return (
|
||||||
<MainContainer>
|
<MainContainer>
|
||||||
<h1>{t("skills")}</h1>
|
<h1>{t("skills")}</h1>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user