Release v0.2.0 #74
|
@ -10,6 +10,7 @@ import { setCookie } from '@/utils/cookies/write';
|
||||||
import { useCookies } from 'react-cookie';
|
import { useCookies } from 'react-cookie';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
handleClose(): void
|
||||||
labels: {
|
labels: {
|
||||||
title: string,
|
title: string,
|
||||||
}
|
}
|
||||||
|
@ -17,7 +18,7 @@ interface Props {
|
||||||
|
|
||||||
const Orientation: React.FC<Props> = (props) => {
|
const Orientation: React.FC<Props> = (props) => {
|
||||||
|
|
||||||
const { labels } = props
|
const { labels, handleClose } = props
|
||||||
|
|
||||||
const [cookies] = useCookies([Cookies.orientation]);
|
const [cookies] = useCookies([Cookies.orientation]);
|
||||||
|
|
||||||
|
@ -25,6 +26,8 @@ const Orientation: React.FC<Props> = (props) => {
|
||||||
const value = event.target.value;
|
const value = event.target.value;
|
||||||
|
|
||||||
await setCookie(Cookies.orientation, value)
|
await setCookie(Cookies.orientation, value)
|
||||||
|
|
||||||
|
handleClose()
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -10,6 +10,7 @@ import { setCookie } from '@/utils/cookies/write';
|
||||||
import { useCookies } from 'react-cookie';
|
import { useCookies } from 'react-cookie';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
handleClose(): void
|
||||||
labels: {
|
labels: {
|
||||||
title: string,
|
title: string,
|
||||||
}
|
}
|
||||||
|
@ -17,7 +18,7 @@ interface Props {
|
||||||
|
|
||||||
const Platform: React.FC<Props> = (props) => {
|
const Platform: React.FC<Props> = (props) => {
|
||||||
|
|
||||||
const { labels } = props
|
const { labels, handleClose } = props
|
||||||
|
|
||||||
const [cookies] = useCookies([Cookies.platform]);
|
const [cookies] = useCookies([Cookies.platform]);
|
||||||
|
|
||||||
|
@ -25,6 +26,8 @@ const Platform: React.FC<Props> = (props) => {
|
||||||
const value = event.target.value;
|
const value = event.target.value;
|
||||||
|
|
||||||
await setCookie(Cookies.platform, value)
|
await setCookie(Cookies.platform, value)
|
||||||
|
|
||||||
|
handleClose()
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -29,8 +29,8 @@ const LangSwitcher: React.FC<Props> = (props) => {
|
||||||
<div className={style.close} onClick={() => { handleClose() }}><IoCloseCircleOutline size={24} /></div>
|
<div className={style.close} onClick={() => { handleClose() }}><IoCloseCircleOutline size={24} /></div>
|
||||||
</header>
|
</header>
|
||||||
<div className={style.content}>
|
<div className={style.content}>
|
||||||
<Platform labels={{ title: labels.platform.title }} />
|
<Platform handleClose={handleClose} labels={{ title: labels.platform.title }} />
|
||||||
<Orientation labels={{ title: labels.orientation.title }} />
|
<Orientation handleClose={handleClose} labels={{ title: labels.orientation.title }} />
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
</dialog >
|
</dialog >
|
||||||
|
|
Loading…
Reference in New Issue