set weather select to widget

This commit is contained in:
Flatlogic Bot 2025-05-12 14:37:55 +00:00
parent 96a0d6d541
commit b8c1684f9a
2 changed files with 18 additions and 15 deletions

File diff suppressed because one or more lines are too long

View File

@ -220,20 +220,6 @@ const Dashboard = () => {
</div>
</div>
)}
<div className="mb-4">
<label htmlFor="city-select" className="block text-sm font-medium text-gray-700 dark:text-gray-300">
{t('pages.dashboard.selectCity', { defaultValue: 'Select City' })}
</label>
<select
id="city-select"
value={selectedCity}
onChange={(e) => setSelectedCity(e.target.value)}
className="mt-1 block w-full p-2 border border-gray-300 rounded-md shadow-sm focus:ring-green-500 focus:border-green-500 sm:text-sm bg-white dark:bg-dark-800 dark:border-dark-600"
>
<option value="London">London</option>
<option value="Minsk">Minsk</option>
</select>
</div>
{weather && (
@ -243,6 +229,22 @@ const Dashboard = () => {
<div className='text-lg leading-tight text-gray-500 dark:text-gray-400'>
Weather
</div>
<div className="mb-4 w-full">
<label htmlFor="city-select" className="block text-sm font-medium text-gray-700 dark:text-gray-300">
{t('pages.dashboard.selectCity', { defaultValue: 'Select City' })}
</label>
<select
id="city-select"
value={selectedCity}
onChange={(e) => setSelectedCity(e.target.value)}
className="mt-1 block w-full p-2 border border-gray-300 rounded-md shadow-sm focus:ring-green-500 focus:border-green-500 sm:text-sm bg-white dark:bg-dark-800 dark:border-dark-600"
>
<option value="London">London</option>
<option value="Minsk">Minsk</option>
</select>
</div>
<div className='text-3xl leading-tight font-semibold'>
{weather.temp}°C
</div>