import React, { createContext, useContext, useState, ReactNode } from 'react'
type ToastType = 'success' | 'error' | 'info' | 'warning'
interface Toast {
id: string
import React, { createContext, useContext, useState, useEffect, ReactNode } from 'react'
import { User } from '@/types'
import api from '@/services/api'
interface AuthContextType {
user: User | null
package api
import (
"context"
"crypto/rand"
"encoding/hex"
export class QueryCache {
constructor() {
this.entries = new Map();
}
getEntry(key) {
package workpool
import (
"context"
"sync"
)
package service
import (
"context"
"golang.org/x/sync/errgroup"
package pipeline
import "context"
func generate(ctx context.Context, nums ...int) <-chan int {
out := make(chan int)
export const initialCart = { items: {} };
export function cartReducer(state, action) {
switch (action.type) {
case 'ADD_ITEM': {
const { product, qty = 1 } = action;
package feed
import "time"
type Event struct {
ID string `json:"id"`
package store
import (
"context"
"database/sql"
)
export const FLAG_REGISTRY = {
newDashboard: {
default: false as boolean,
description: 'Renders the redesigned dashboard shell',
},
maxUploadMb: {
package export
import (
"encoding/csv"
"log"
"net/http"