instruction stringlengths 25 121 | input stringclasses 1
value | output stringlengths 0 296k |
|---|---|---|
Describe the contents of the file components.json. | {
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.ts",
"css": "app/globals.css",
"baseColor": "slate",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils... | |
Describe the contents of the file next.config.mjs. | /** @type {import('next').NextConfig} */
const nextConfig = {
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'coin-images.coingecko.com',
port: '',
pathname: '/**',
},
{
protocol:'https',
hostname:"lh3.googleusercontent.com",
po... | |
Describe the contents of the file next-env.d.ts. | /// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
| |
Describe the contents of the file tailwind.config.ts. | import type { Config } from "tailwindcss"
const config = {
darkMode: ["class"],
content: [
'./pages/**/*.{ts,tsx}',
'./components/**/*.{ts,tsx}',
'./app/**/*.{ts,tsx}',
'./src/**/*.{ts,tsx}',
],
prefix: "",
theme: {
container: {
center: true,
padding: "2rem",
screens: {
... | |
Describe the contents of the file .eslintrc.json. | {
"extends": "next/core-web-vitals"
}
| |
Describe the contents of the file package.json. | {
"name": "binance-frontend",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "npx prisma generate && next build",
"start": "next start ",
"lint": "next lint"
},
"dependencies": {
"@hookform/resolvers": "^3.9.0",
"@next-auth/mongodb-adapter": "^1.1.3",
... | |
Describe the contents of the file Dockerfile. | FROM node:16-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
WORKDIR /app/db
RUN npx prisma generate
WORKDIR /app
RUN npm run build
EXPOSE 3000
CMD [ "npm" , "start" ] | |
Describe the contents of the file tsconfig.json. | {
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "pr... | |
Describe the contents of the file .env. | DATABASE_URL=postgres://avnadmin:AVNS_Z4AxBvGySZYS7c-SVVh@pg-2f95c8c3-saimanideepnaidu-669c.l.aivencloud.com:13599/defaultdb?sslmode=require
#Razorpay
RAZORPAY_KEY_ID =rzp_live_ysF8drCMbc7We6
RAZORPAY_KEY_SECRET=kvVknh4VWlU7PBPI9iVQB3Ar
#Google
GOOGLE_CLIENT_SECRET=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
GOOGLE_CLIENT_I... | |
Describe the contents of the file postcss.config.mjs. | /** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
tailwindcss: {},
},
};
export default config;
| |
Describe the contents of the file docker-compose.yml. | version: '3.8'
services:
app:
image: node:14
volumes:
- .:/app
working_dir: /app
command: npm run dev
ports:
- 3000:3000
depends_on:
- db
db:
image: postgres:13
volumes:
- ./db:/var/lib/postgresql/data
environment:
- POSTGRES_USER=postgres
- ... | |
Describe the contents of the file package-lock.json. | {
"name": "binance-frontend",
"version": "0.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "binance-frontend",
"version": "0.1.0",
"dependencies": {
"@hookform/resolvers": "^3.9.0",
"@next-auth/mongodb-adapter": "^1.1.3",
"@next-auth/pri... | |
Describe the folder lib/. | This is a directory. It may contain files or subdirectories. | |
Describe the folder components/. | This is a directory. It may contain files or subdirectories. | |
Describe the folder prisma/. | This is a directory. It may contain files or subdirectories. | |
Describe the folder hooks/. | This is a directory. It may contain files or subdirectories. | |
Describe the folder public/. | This is a directory. It may contain files or subdirectories. | |
Describe the folder store/. | This is a directory. It may contain files or subdirectories. | |
Describe the folder app/. | This is a directory. It may contain files or subdirectories. | |
Describe the contents of the file lib/auth.ts. | import GoogleProvider from "next-auth/providers/google";
import { PrismaAdapter } from "@next-auth/prisma-adapter";
import { prisma } from "./prisma";
export const authOptions = {
adapter: PrismaAdapter(prisma),
providers: [
GoogleProvider({
clientId: process.env.GOOGLE_CLIENT_ID!,
clientSecret: pr... | |
Describe the contents of the file lib/utils.ts. | import { type ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
| |
Describe the contents of the file lib/prisma.ts. | import { PrismaClient } from "@prisma/client"
const globalForPrisma = globalThis as unknown as { prisma: PrismaClient }
export const prisma = globalForPrisma.prisma || new PrismaClient()
if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma | |
Describe the contents of the file lib/types.ts. | export type MarketData = {
s: string;
c: string;
p: string;
P: string;
h: string;
l: string;
v: string;
q: string;
};
| |
Describe the contents of the file components/WalletButton.tsx. | 'use client'
import { useState } from 'react'
import useBalance from "@/hooks/balancechecker"
import { Wallet, Plus } from "lucide-react"
import { Button } from "@/components/ui/button"
import {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dial... | |
Describe the contents of the file components/Orders.tsx. | import OrderDisplay from "@/app/(pages)/orders/page";
export default function OrdersPage() {
return (
<div className="container mx-auto py-8">
<h1 className="text-3xl font-bold mb-6">Your Orders</h1>
<OrderDisplay />
</div>
)
} | |
Describe the contents of the file components/DepositButton.tsx. | 'use client'
import { useState } from "react"
import { useRouter } from "next/navigation"
import { HandCoins } from "lucide-react"
import { Button } from "./ui/button"
import AddMoney from "@/components/payment/addAmount"
import {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
} from ".... | |
Describe the contents of the file components/DarkModeToggle.tsx. | "use client"
import * as React from "react"
import { Moon, Sun } from "lucide-react"
import { useTheme } from "next-themes"
import { Button } from "@/components/ui/button"
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu"
export default ... | |
Describe the folder components/orderToast/. | This is a directory. It may contain files or subdirectories. | |
Describe the folder components/toasts/. | This is a directory. It may contain files or subdirectories. | |
Describe the folder components/core/. | This is a directory. It may contain files or subdirectories. | |
Describe the folder components/payment/. | This is a directory. It may contain files or subdirectories. | |
Describe the folder components/Skeletons/. | This is a directory. It may contain files or subdirectories. | |
Describe the folder components/account/. | This is a directory. It may contain files or subdirectories. | |
Describe the folder components/trade/. | This is a directory. It may contain files or subdirectories. | |
Describe the contents of the file components/orderToast/OrderToast.tsx. | 'use client'
import { useState, useEffect } from 'react'
import { X } from 'lucide-react'
import { motion, AnimatePresence } from 'framer-motion'
interface OrderDialogProps {
isOpen: boolean
onClose: () => void
type: 'buy' | 'sell'
crypto: string
amount: string
price: string
}
export default function Ord... | |
Describe the contents of the file components/toasts/InternetConnectionToast.tsx. | 'use client'
import { useEffect, useState } from 'react'
import { Toast, ToastDescription, ToastProvider, ToastViewport } from "@/components/ui/toast"
import { useToast } from "@/components/ui/use-toast"
export function InternetConnectionToast() {
const [isOnline, setIsOnline] = useState(true)
const { toast } = u... | |
Describe the contents of the file components/core/Footer.tsx. | import React from 'react'
import { motion } from "framer-motion"
import Link from "next/link"
export default function Footer() {
return (
<footer className="bg-gray-900 py-12">
<div className="container mx-auto px-4 sm:px-6">
<div className="grid grid-cols-2 md:grid-cols-4 gap-8">
<div>
... | |
Describe the contents of the file components/core/Appbar.tsx. | import { useState } from "react"
import { usePathname, useRouter } from "next/navigation"
import Link from "next/link"
import { MenuIcon, User } from "lucide-react"
import { signIn, useSession } from "next-auth/react"
import { Input } from "@/components/ui/input"
import { Button } from "@/components/ui/button"
import U... | |
Describe the contents of the file components/core/sideNavBar.tsx. | 'use client'
import Link from 'next/link'
import { useTheme } from 'next-themes'
import {
ShoppingCartIcon,
BellIcon,
LogOutIcon,
UserIcon,
UsersIcon,
FacebookIcon,
TwitterIcon,
MoonIcon,
SunIcon,
TrendingUp,
} from 'lucide-react'
import { usePathname } from 'next/navigation'
interface SideNavbarP... | |
Describe the contents of the file components/payment/addAmount.tsx. | import { useState, useEffect } from 'react'
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogClose } from "@/components/ui/dialog"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Card, CardContent } from "@/components/ui/card"
import { Alert, AlertD... | |
Describe the contents of the file components/Skeletons/TradingViewSkeleton.tsx. | import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
import { Skeleton } from "@/components/ui/skeleton"
export function TradeViewChartSkeleton() {
return (
<div className="p-4">
<Skeleton className="h-8 w-64 mb-4 bg-gray-200 dark:bg-gray-700" />
<Tabs defaultValue="5m">
... | |
Describe the contents of the file components/Skeletons/MarketBarSkeleton.tsx. | import { Card, CardContent } from "../ui/card";
export function MarketBarSkeleton() {
return (
<Card className="bg-gray-900 text-white overflow-hidden border-none p-4 rounded-none">
<CardContent className="p-2">
<div className="flex items-center space-x-4 overflow-x-auto whitespace-nowrap">
... | |
Describe the contents of the file components/Skeletons/MarketsSkeleton.tsx. | "use client"
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs"
import { Table, TableBody, TableCell, TableRow } from "@/components/ui/table"
import { Button } from "@/components/ui/button"
import { Skeleton } from "@/components/ui/skeleton"
import { ArrowDown } from "lucide-react"
export default func... | |
Describe the contents of the file components/Skeletons/AskBidSkeleton.tsx. | import { Table, TableCell, TableHead, TableHeader, TableRow, TableBody } from "@/components/ui/table"
import { Skeleton } from "@/components/ui/skeleton"
export function AskSkeleton() {
return (
<Table className="w-full text-center border-2 border-gray-200 dark:border-gray-700 rounded-lg">
<TableHeader>
... | |
Describe the contents of the file components/account/AvatarSetup.tsx. | import {
Avatar,
AvatarFallback,
AvatarImage,
} from "@/components/ui/avatar"
interface AvatarProps {
avatar: string
username: string
}
export function GetAvatar({avatar, username}:AvatarProps) {
return (
<Avatar className="rounded-full">
<AvatarImage src={avatar} alt={... | |
Describe the contents of the file components/account/AccountDetails.tsx. | import {
Cloud,
CreditCard,
Github,
Keyboard,
LifeBuoy,
LogOut,
Mail,
MessageSquare,
Plus,
PlusCircle,
Settings,
User,
UserPlus,
Users,
} from "lucide-react";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuGroup,
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuPortal,
... | |
Describe the contents of the file components/account/getIntialDetails.tsx. | ||
Describe the contents of the file components/account/UserDetails.tsx. | "use client";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "../ui/dropdown-menu";
import { signOut } from "next-auth/react";
import { useSession } from "next-auth/react";
import { LogOut, UserRound } from "lucide-react";
... | |
Describe the contents of the file components/account/ProfilePage.tsx. | 'use client'
import { useState } from 'react'
import { useRouter } from 'next/navigation'
import { User } from '@prisma/client'
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
import { Card, CardContent, CardFooter, CardHeader,... | |
Describe the folder components/trade/markets/. | This is a directory. It may contain files or subdirectories. | |
Describe the contents of the file components/trade/markets/CryptoTable.tsx. | import { TableBody, TableCell, TableRow, Table } from "@/components/ui/table"
import Image from "next/image"
import { useRouter } from "next/navigation"
interface CryptoData {
symbol: string
current_price: string
priceChangePercent: string
volume: string
marketCap: string
image: string
name: string
}
in... | |
Describe the contents of the file components/trade/markets/Confirmation.tsx. | ||
Describe the contents of the file components/trade/markets/BidTable.tsx. | import { Table, TableCell, TableRow, TableBody } from "@/components/ui/table"
interface BidProps {
bids: Map<string, string>;
}
export function Bid({ bids }: BidProps) {
const sortedBids = Array.from(bids.entries())
.sort((a, b) => parseFloat(b[0]) - parseFloat(a[0]))
.slice(0, 7);
const maxQuantity = ... | |
Describe the contents of the file components/trade/markets/AskTable.tsx. | import { Table, TableCell, TableHead, TableHeader, TableRow, TableBody } from "@/components/ui/table"
interface AskOrder {
price: string;
quantity: string;
}
interface AskProps {
asks: Map<string, string>;
}
export function Ask({ asks }: AskProps) {
const sortedAsks = Array.from(asks.entries())
.sort((a,... | |
Describe the contents of the file components/trade/markets/TradeView.tsx. | "use client";
import React, { useCallback, useEffect, useRef, useState } from "react";
import {
createChart,
ColorType,
IChartApi,
ISeriesApi,
UTCTimestamp,
CandlestickData,
} from "lightweight-charts";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
type TimeframeKey = "5... | |
Describe the contents of the file components/trade/markets/OrderUI.tsx. | "use client";
import { useState, useEffect, useRef } from "react";
import Image from "next/image";
import { Input } from "@/components/ui/input";
import { Button } from "@/components/ui/button";
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { Card, CardContent } from "@/components/ui/card"... | |
Describe the contents of the file components/trade/markets/MarketBar.tsx. | "use client"
import { Card, CardContent } from "@/components/ui/card"
import { ArrowUpIcon, ArrowDownIcon } from 'lucide-react'
import UseMarketWebsockets from "@/hooks/MarketWebsockets"
import { MarketBarSkeleton } from "@/components/Skeletons/MarketBarSkeleton"
export function MarketBar({ market}: { market : stri... | |
Describe the contents of the file components/trade/markets/cryptoPage.tsx. | "use client"
import { useState, useEffect, useCallback } from "react"
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs"
import { Table, TableBody, TableCell, TableRow, TableHead, TableHeader } from "@/components/ui/table"
import { Button } from "@/components/ui/button"
import { Input } from "@/compone... | |
Describe the contents of the file components/trade/markets/Deposit.tsx. | import { useState } from "react"
export default function Deposit(){
return(
<div className="w-full flex items-center justify-center h-screen bg-background">
<div className="w-full max-w-md space-y-6">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke... | |
Describe the contents of the file prisma/.gitignore. | node_modules
# Keep environment variables out of version control
.env
| |
Describe the contents of the file prisma/schema.prisma. | datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
}
model User {
id String @id @default(cuid())
name String?
email String @unique
emailVerified DateTime?
image String?
accoun... | |
Describe the folder prisma/migrations/. | This is a directory. It may contain files or subdirectories. | |
Describe the contents of the file prisma/migrations/migration_lock.toml. | # Please do not edit this file manually
# It should be added in your version-control system (i.e. Git)
provider = "postgresql" | |
Describe the folder prisma/migrations/20240930192207_init56/. | This is a directory. It may contain files or subdirectories. | |
Describe the folder prisma/migrations/20240929185444_init21/. | This is a directory. It may contain files or subdirectories. | |
Describe the folder prisma/migrations/20240927181846_init/. | This is a directory. It may contain files or subdirectories. | |
Describe the folder prisma/migrations/20240930191102_init56/. | This is a directory. It may contain files or subdirectories. | |
Describe the folder prisma/migrations/20240930021000_init22/. | This is a directory. It may contain files or subdirectories. | |
Describe the folder prisma/migrations/20240930192718_init55/. | This is a directory. It may contain files or subdirectories. | |
Describe the folder prisma/migrations/20240927182302_init2/. | This is a directory. It may contain files or subdirectories. | |
Describe the contents of the file prisma/migrations/20240930192207_init56/migration.sql. | /*
Warnings:
- Changed the type of `amount` on the `Deposit` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
- Changed the type of `amount_due` on the `Deposit` table. No cast exists, the column would be dropped and recreated,... | |
Describe the contents of the file prisma/migrations/20240929185444_init21/migration.sql. | -- CreateTable
CREATE TABLE "Deposit" (
"id" SERIAL NOT NULL,
"userId" TEXT NOT NULL,
"amount" INTEGER NOT NULL,
"status" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "Deposit_pkey" PRIMARY KEY ("id")
);
-- AddFor... | |
Describe the contents of the file prisma/migrations/20240927181846_init/migration.sql. | -- CreateEnum
CREATE TYPE "TranscationType" AS ENUM ('Buy', 'Sell');
-- CreateEnum
CREATE TYPE "OrderStatus" AS ENUM ('Pending', 'Sucess', 'Failed');
-- CreateTable
CREATE TABLE "User" (
"id" TEXT NOT NULL,
"name" TEXT,
"email" TEXT NOT NULL,
"emailVerified" TIMESTAMP(3),
"image" TEXT,
"balanc... | |
Describe the contents of the file prisma/migrations/20240930191102_init56/migration.sql. | /*
Warnings:
- The primary key for the `Deposit` table will be changed. If it partially fails, the table could be left without primary key constraint.
- Changed the type of `status` on the `Deposit` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the... | |
Describe the contents of the file prisma/migrations/20240930021000_init22/migration.sql. | /*
Warnings:
- Added the required column `amount_due` to the `Deposit` table without a default value. This is not possible if the table is not empty.
- Added the required column `amount_paid` to the `Deposit` table without a default value. This is not possible if the table is not empty.
- Added the required co... | |
Describe the contents of the file prisma/migrations/20240930192718_init55/migration.sql. | -- AlterTable
ALTER TABLE "Deposit" ALTER COLUMN "receipt" DROP NOT NULL;
| |
Describe the contents of the file prisma/migrations/20240927182302_init2/migration.sql. | /*
Warnings:
- The values [Sucess] on the enum `OrderStatus` will be removed. If these variants are still used in the database, this will fail.
- You are about to drop the column `transcationType` on the `Order` table. All the data in the column will be lost.
- Added the required column `transactionType` to th... | |
Describe the contents of the file hooks/balancechecker.ts. | 'use client'
import { useState, useEffect } from "react";
import { getBalance } from "@/app/(server)/actions/getBalance";
export default function useBalance() {
const [balance, setBalance] = useState(0);
const [loading, setLoading] = useState(true);
useEffect(() => {
getBalance().then((balance) => {
... | |
Describe the contents of the file hooks/MarketWebsockets.ts. | import { MarketData } from "@/lib/types";
import React, { useEffect, useState } from "react";
export default function UseMarketWebsockets(market:string) {
const [marketData, setMarketData] = useState<MarketData | null>(null);
const [priceChangeColor, setPriceChangeColor] = useState<
"text-green-500" | "text-re... | |
Describe the contents of the file hooks/onlineChecker.ts. | import { useState, useEffect } from 'react';
const useOnlineStatus = () => {
const [isOnline, setIsOnline] = useState(true);
useEffect(() => {
setInterval(()=>{
if (typeof window !== 'undefined') {
setIsOnline(navigator.onLine);
const updateOnlineStatus = () => {
setIsOnline(navigator.... | |
Describe the contents of the file public/bg-web3.webp. | <Error reading file: 'utf-8' codec can't decode byte 0x98 in position 4: invalid start byte> | |
Describe the contents of the file public/rzp-key.csv. | key_id,key_secret
rzp_live_ysF8drCMbc7We6,kvVknh4VWlU7PBPI9iVQB3Ar
| |
Describe the contents of the file public/maze.pdf. | <Error reading file: 'utf-8' codec can't decode byte 0xd3 in position 11: invalid continuation byte> | |
Describe the contents of the file public/resume_new.pdf. | <Error reading file: 'utf-8' codec can't decode byte 0xd3 in position 10: invalid continuation byte> | |
Describe the contents of the file public/bg-web3.gif. | <Error reading file: 'utf-8' codec can't decode byte 0x96 in position 6: invalid start byte> | |
Describe the contents of the file public/mdmsmch.aiimsexams.ac.in_RegistrationSlip_Index_id=diEmVvzqZFt+43JtLEselw==.pdf. | <Error reading file: 'utf-8' codec can't decode byte 0xd3 in position 10: invalid continuation byte> | |
Describe the contents of the file public/as.svg. | undefined | |
Describe the contents of the file public/usdc.webp. | <Error reading file: 'utf-8' codec can't decode byte 0x80 in position 39: invalid start byte> | |
Describe the contents of the file public/artisan.pdf. | <Error reading file: 'utf-8' codec can't decode byte 0xe2 in position 10: invalid continuation byte> | |
Describe the contents of the file public/111.pdf. | <Error reading file: 'utf-8' codec can't decode byte 0xd3 in position 10: invalid continuation byte> | |
Describe the contents of the file public/vercel.svg. | <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 283 64"><path fill="black" d="M141 16c-11 0-19 7-19 18s9 18 20 18c7 0 13-3 16-7l-7-5c-2 3-6 4-9 4-5 0-9-3-10-7h28v-3c0-11-8-18-19-18zm-9 15c1-4 4-7 9-7s8 3 9 7h-18zm117-15c-11 0-19 7-19 18s9 18 20 18c6 0 12-3 16-7l-8-5c-2 3-5 4-8 4-5 0-9-3-11-7h28l1-3c0-1... | |
Describe the contents of the file public/sol.webp. | <Error reading file: 'utf-8' codec can't decode byte 0xfc in position 4: invalid start byte> | |
Describe the contents of the file public/next.svg. | <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="... | |
Describe the contents of the file store/store.ts. | import { configureStore } from '@reduxjs/toolkit'
import orderReducer from './slices/cryptoOrders'
export const store = configureStore({
reducer: {
order: orderReducer,
},
})
export type RootState = ReturnType<typeof store.getState>
export type AppDispatch = typeof store.dispatch | |
Describe the folder store/slices/. | This is a directory. It may contain files or subdirectories. | |
Describe the contents of the file store/slices/userInitialDetails.ts. | ||
Describe the contents of the file store/slices/cryptoOrders.ts. | import { createSlice, PayloadAction } from '@reduxjs/toolkit'
interface OrderState {
price: string
quantity: string
activeTab: 'buy' | 'sell'
orderType: 'limit' | 'market'
marketPrice: number
}
const initialState: OrderState = {
price: '',
quantity: '',
activeTab: 'buy',
orderType: 'limit',
market... | |
Describe the contents of the file store/slices/orderSlice.ts. | import { createSlice, createAsyncThunk, PayloadAction } from '@reduxjs/toolkit'
export type Order = {
id: string
transactionType: 'Buy' | 'Sell'
amount: number
status: 'Pending' | 'Success' | 'Failed'
crypto: {
currency: string
}
}
type OrderState = {
orders: Order[]
loading: boolean
error: stri... | |
Describe the contents of the file app/globals.css. | @tailwind base;
@tailwind components;
@tailwind utilities;
:root {
--background: 0 0% 100%;
--foreground: 222.2 84% 4.9%;
--card: 0 0% 100%;
--card-foreground: 222.2 84% 4.9%;
--popover: 0 0% 100%;
--popover-foreground: 222.2 84% 4.9%;
--primary: 222.2 47.4% 11.2%;
--primary-foregroun... | |
Describe the contents of the file app/Providers.tsx. | "use client";
import * as React from "react";
import { ThemeProvider as NextThemesProvider } from "next-themes";
import { type ThemeProviderProps } from "next-themes/dist/types";
import { Provider } from "react-redux";
import { store } from "@/store/store";
import { SessionProvider } from "next-auth/react";
import Scr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.