|
|
|
@ -1,6 +1,9 @@ |
|
|
|
|
import React, { useEffect, useState } from 'react' |
|
|
|
|
import { Dropdown, DropdownButton } from 'react-bootstrap' |
|
|
|
|
import DropdownItem from "react-bootstrap/DropdownItem"; |
|
|
|
|
import DropdownItem from 'react-bootstrap/DropdownItem' |
|
|
|
|
import { localeLang } from './types/carouselTypes' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export function LanguageOptions({ plugin }: { plugin: any }) { |
|
|
|
|
const [langOptions, setLangOptions] = useState<string>() |
|
|
|
@ -15,6 +18,12 @@ export function LanguageOptions({ plugin }: { plugin: any }) { |
|
|
|
|
}) |
|
|
|
|
}, [langOptions]) |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
plugin.on('locale', 'localeChanged', (lang: localeLang) => { |
|
|
|
|
setLangOptions(lang.code.toUpperCase()) |
|
|
|
|
}) |
|
|
|
|
}, [langOptions]) |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<> |
|
|
|
|
<div className="d-flex align-items-center justify-content-end mr-2"> |
|
|
|
|