Skip to content

Commit

Permalink
Fix: import from lowercase component folder (#92)
Browse files Browse the repository at this point in the history
* Rename usage components folder to fix Vercel build
  • Loading branch information
tedspare authored Jan 22, 2024
1 parent 703ebf8 commit f727817
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 12 deletions.
5 changes: 1 addition & 4 deletions app/dashboard/(base)/usage/[[...metric]]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import {notFound} from 'next/navigation'
import z from 'zod'
import {
ChartsLinks,
UsageCharts
} from '../../../../../lib/components/dashboard/Usage'
import {ChartsLinks, UsageCharts} from '~/components/dashboard/Metrics'

const paramsSchema = z.enum(['runs', 'tokens'])

Expand Down
2 changes: 1 addition & 1 deletion app/dashboard/(base)/usage/[[...metric]]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {UsageTable} from '~/components/dashboard/Usage'
import {UsageTable} from '~/components/dashboard/Metrics'

export default async function Usage({
searchParams,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'use client'

import {LineChart} from '@tremor/react'

export function Chart({
Expand All @@ -13,6 +12,7 @@ export function Chart({
}) {
const customTooltip = ({payload, active}: {payload: any; active: any}) => {
if (!active || !payload) return null

return (
<div className='w-56 rounded-tremor-default border border-tremor-border bg-tremor-background p-2 text-tremor-default shadow-tremor-dropdown'>
{payload.map((category: any, idx: number) => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {getServerSession} from 'next-auth'
import {authOptions} from '~/authOptions'
import {Chart} from '~/components/dashboard/Usage/Chart'
import prisma from '~/prisma'
import {Chart} from '.'

type UsageDay = {
usageDay: Date
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
TableRow
} from '~/components/ui/table'
import {cn} from '~/utils'
import {UsageRow} from './TableWrapper'
import {type UsageRow} from './TableWrapper'

const TableColNames = [
{
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ import Link from 'next/link'
import {redirect} from 'next/navigation'
import z from 'zod'
import {authOptions} from '~/authOptions'
import {CustomTable} from '~/components/dashboard/Usage/CustomTable'
import {TableSearch} from '~/components/dashboard/Usage/Search'
import {Button} from '~/components/ui/button'
import prisma from '~/prisma'
import {cn} from '~/utils'
import {CustomTable, TableSearch} from '.'

type UsageProject = {
name: string
Expand Down
File renamed without changes.
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"baseUrl": ".",
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"paths": {
"~/*": ["./lib/*"],
"~/components/*": ["./lib/components/*"]
"~/*": ["./lib/*"]
},
"plugins": [{"name": "next"}],
"types": ["bun-types", "web"]
Expand Down

1 comment on commit f727817

@vercel
Copy link

@vercel vercel bot commented on f727817 Jan 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.