1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-11-08 22:31:30 +01:00

perf: remove unnecessary fonts weight

This commit is contained in:
Divlo 2021-08-23 19:41:39 +02:00
parent b5945150b8
commit fc5ba28b8a
No known key found for this signature in database
GPG Key ID: 6F24DA54DA3967CF
4 changed files with 26 additions and 24 deletions

View File

@ -1,6 +1,7 @@
import { useCallback, useEffect, useState } from 'react'
import useTranslation from 'next-translate/useTranslation'
import setLanguage from 'next-translate/setLanguage'
import classNames from 'classnames'
import { Arrow } from './Arrow'
import { LanguageFlag } from './LanguageFlag'
@ -41,27 +42,29 @@ export const Language: React.FC = () => {
<LanguageFlag language={currentLanguage} />
<Arrow />
</div>
{!hiddenMenu && (
<ul
data-cy='languages-list'
className='flex flex-col justify-center items-center absolute p-0 top-14 z-10 w-24 mt-3 mr-4 rounded-lg list-none shadow-light dark:shadow-dark bg-white dark:bg-black'
>
{i18n.locales.map((language, index) => {
if (language === currentLanguage) {
return null
}
return (
<li
key={index}
className='flex items-center justify-center w-full h-12 hover:bg-[#4f545c] hover:bg-opacity-20 pl-2'
onClick={async () => await handleLanguage(language)}
>
<LanguageFlag language={language} />
</li>
)
})}
</ul>
)}
<ul
data-cy='languages-list'
className={classNames(
'flex flex-col justify-center items-center absolute p-0 top-14 z-10 w-24 mt-3 mr-4 rounded-lg list-none shadow-light dark:shadow-dark bg-white dark:bg-black',
{ hidden: hiddenMenu }
)}
>
{i18n.locales.map((language, index) => {
if (language === currentLanguage) {
return null
}
return (
<li
key={index}
className='flex items-center justify-center w-full h-12 hover:bg-[#4f545c] hover:bg-opacity-20 pl-2'
onClick={async () => await handleLanguage(language)}
>
<LanguageFlag language={language} />
</li>
)
})}
</ul>
</div>
)
}

View File

@ -11,7 +11,7 @@ export const InterestParagraph: React.FC<InterestParagraphProps> = (props) => {
return (
<>
<p className='text-center my-6 text-gray dark:text-gray-dark'>
<strong className='text-yellow font-medium text-lg dark:text-yellow-dark'>
<strong className='text-yellow font-semibold text-lg dark:text-yellow-dark'>
{title}
</strong>
<br />

View File

@ -5,7 +5,7 @@ import DivloLogo from 'public/images/divlo_logo.png'
export const ProfileLogo: React.FC = () => {
return (
<div className='px-2 py-6 max-w-[370px] max-h-[370px]'>
<Image src={DivloLogo} alt='Divlo' />
<Image src={DivloLogo} alt='Divlo' priority />
</div>
)
}

View File

@ -6,7 +6,6 @@ import UniversalCookie from 'universal-cookie'
import 'tailwindcss/tailwind.css'
import '@fontsource/montserrat/400.css'
import '@fontsource/montserrat/500.css'
import '@fontsource/montserrat/600.css'
const universalCookie = new UniversalCookie()