добавлена локализация главного экрана, без записи
This commit is contained in:
@@ -1,7 +1,19 @@
|
||||
import React from "react";
|
||||
import React, { useContext } from "react";
|
||||
import { ContextLang } from "../ContextLang";
|
||||
|
||||
export const OrLineContainer:React.FC = () => <div className="main-part-content-or-line-container">
|
||||
<span className="main-part-content-or-line"></span>
|
||||
<span className="main-part-content-or-line-text">или</span>
|
||||
<span className="main-part-content-or-line"></span>
|
||||
</div>;
|
||||
type TProps = {
|
||||
text: {
|
||||
ru: string,
|
||||
en: string
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export const OrLineContainer:React.FC<TProps> = (props) => {
|
||||
const {lang} = useContext(ContextLang);
|
||||
return <div className="main-part-content-or-line-container">
|
||||
<span className="main-part-content-or-line"></span>
|
||||
<span className="main-part-content-or-line-text">{props.text[lang]}</span>
|
||||
<span className="main-part-content-or-line"></span>
|
||||
</div>
|
||||
};
|
||||
Reference in New Issue
Block a user