Skip to content

Commit

Permalink
style: LanguageSelectorWrapped extracted into separate component
Browse files Browse the repository at this point in the history
  • Loading branch information
aziolek committed Dec 2, 2024
1 parent 7dd5937 commit 615d1a5
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.root {
height: 5.28rem;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import cx from 'classnames';
import React, { FC } from 'react';

import LanguageSelector from 'components/shared/LanguageSelector';

import styles from './LanguageSelectorWrapped.module.scss';
import LanguageSelectorWrappedProps from './types';

const LanguageSelectorWrapped: FC<LanguageSelectorWrappedProps> = ({ className }) => (
<div className={cx(styles.root, className)}>
<LanguageSelector />
</div>
);

export default LanguageSelectorWrapped;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// eslint-disable-next-line no-restricted-exports
export { default } from './LanguageSelectorWrapped';
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default interface LanguageSelectorWrappedProps {
className?: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@
}

.languageSelector {
height: 5.28rem;

@media #{$phone-down} {
align-self: flex-start;
margin-top: 4rem;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import cx from 'classnames';
import React, { FC, memo, ReactElement, useLayoutEffect, useRef } from 'react';
import React, { FC, memo, useLayoutEffect, useRef } from 'react';
import { Trans, useTranslation } from 'react-i18next';

import LanguageSelector from 'components/shared/LanguageSelector';
import LanguageSelectorWrapped from 'components/shared/Layout/LanguageSelectorWrapped';
import Svg from 'components/ui/Svg';
import {
BLOG_POST,
Expand All @@ -23,12 +23,6 @@ import { octantSemiTransparent } from 'svg/logo';
import styles from './LayoutFooter.module.scss';
import LayoutFooterProps from './types';

const LanguageSelectorWrapped = (): ReactElement => (
<div className={styles.languageSelector}>
<LanguageSelector />
</div>
);

const LayoutFooter: FC<LayoutFooterProps> = ({ className }) => {
const { t } = useTranslation('translation', { keyPrefix: 'layout.footer' });
const { isDesktop, isMobile } = useMediaQuery();
Expand Down

0 comments on commit 615d1a5

Please sign in to comment.