openreplay/frontend/app/layout/LangBanner.tsx
2025-03-24 11:09:22 +01:00

29 lines
No EOL
870 B
TypeScript

import React from 'react'
import {
Languages, X
} from 'lucide-react'
import { Button } from 'antd';
import { useHistory } from "react-router-dom";
import { client } from 'App/routes'
function LangBanner({ onClose }: { onClose: () => void }) {
const history = useHistory()
const onClick = () => {
history.push(client('account'))
}
return (
<div className={'px-4 py-2 bg-yellow flex items-center w-screen gap-2'}>
<div>
OpenReplay now supports French, Russian, Chinese, and Spanish 🎉. Update your language in settings.
</div>
<div className={'ml-auto'} />
<Button icon={<Languages size={14} />} size={'small'} onClick={onClick}>
Change Language
</Button>
<Button icon={<X size={16} />} type={'text'} shape={'circle'} onClick={onClose} size={'small'} />
</div>
)
}
export default LangBanner