xxxxxxxxxx
import { getUnit } from '@/lib/utils'
import React from 'react'
const ForecastVisual = ({ data }: { data:any }) => {
console.log('forecast data', data)
// turns object to array
const array:any = Object.keys(data).map(key => new Object({ [key]: data[key] }))
console.log('array:', array)
const gridCols = Math.min(array.length, 12)
return (
<section className="px-4">
<div
className={`text-center text-slate-500 p-4 grid gap-8 md:gap-4 place-items-center max-md:grid-cols-1 grid-cols-${gridCols}`}
>
{array.map((weather, index) => {
// Check if it's the last item
const isLastItem = index === array.length - 1
return Object.entries(weather).map(([key, value]) => (
<p className={`w-full ${!isLastItem ? 'md:border-r border-gray-200' : ''}`}>
<span className="capitalize">{key.replace(/[-_]/g, ' ')}</span>
<span className="block text-2xl lg:text-4xl text-purple-700">
{typeof value === 'number' ? value?.toFixed(2) : '--'}{' '}
{getUnit(key)}
</span>
</p>
))
})}
</div>
</section>
)
}
export default ForecastVisual
Uninstall Zed in linux using following command:
xxxxxxxxxx
curl https://raw.githubusercontent.com/zed-industries/zed/82ad7f2b/script/install.sh | sh -s uninstall
There is another step by step procedure mentioned in the source page of this command, which is stackexchange link provided with this