-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allowed origin env fix, turkish language
- Loading branch information
1 parent
d1bc707
commit 80545be
Showing
11 changed files
with
193 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,33 @@ | ||
import React from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import styled from "styled-components"; | ||
|
||
const Button = styled.button` | ||
margin-right: 2px; | ||
margin-left: 0; | ||
padding: 4px; | ||
background-color: transparent; | ||
color: black; | ||
//border: 1px solid #333; | ||
//box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); | ||
&:hover { | ||
background-color: #f5f5f5; | ||
} | ||
`; | ||
|
||
const LanguageSwitcher = () => { | ||
const { i18n } = useTranslation(); | ||
const { i18n } = useTranslation(); | ||
|
||
const changeLanguage = (language) => { | ||
i18n.changeLanguage(language); | ||
}; | ||
const changeLanguage = (language) => { | ||
i18n.changeLanguage(language); | ||
}; | ||
|
||
return ( | ||
<div> | ||
<button onClick={() => changeLanguage('en')}>English</button> | ||
<button onClick={() => changeLanguage('tr')}>Türkçe</button> | ||
</div> | ||
); | ||
return ( | ||
<div> | ||
<Button onClick={() => changeLanguage('en')}>EN</Button> | ||
<Button onClick={() => changeLanguage('tr')}>TR</Button> | ||
</div> | ||
); | ||
}; | ||
|
||
export default LanguageSwitcher; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.