Dado uma lista de vendas individuais é necessário saber o valor total e quantidade de produtos vendidos como o exemplo abaixo:
[
{
name: 'TV 40 polegadas',
value: 2000
},
{| import SwiftUI | |
| struct GridStack<Content: View>: View { | |
| let rows: Int | |
| let columns: Int | |
| let content: (Int, Int) -> Content | |
| var body: some View { | |
| VStack { | |
| ForEach(0..<rows) { row in |
| import useSWR, { ConfigInterface, responseInterface } from 'swr' | |
| import axios, { AxiosRequestConfig, AxiosResponse, AxiosError } from 'axios' | |
| export type GetRequest = AxiosRequestConfig | null | |
| interface Return<Data, Error> | |
| extends Pick< | |
| responseInterface<AxiosResponse<Data>, AxiosError<Error>>, | |
| 'isValidating' | 'revalidate' | 'error' | |
| > { |
| // Hook | |
| import { useEffect, useState } from 'react'; | |
| const cachedScripts: any = []; | |
| const loadingScripts: any = []; | |
| export const useScript = (src: string) => { | |
| // Keeping track of script loaded and error state | |
| const [state, setState] = useState({ | |
| loaded: false, |