Skip to content

Commit

Permalink
feat(ui): searching function
Browse files Browse the repository at this point in the history
  • Loading branch information
wwayne committed May 13, 2024
1 parent 1a7f07d commit 6d313e8
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ee/tabby-ui/app/(home)/components/stats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { queryDailyStats, queryDailyStatsInPastYear } from '@/lib/tabby/query'
import { Card, CardContent } from '@/components/ui/card'
import { Skeleton } from '@/components/ui/skeleton'
import LoadingWrapper from '@/components/loading-wrapper'
import { Input } from '@/components/ui/input'

import { CompletionCharts } from './completion-charts'

Expand Down Expand Up @@ -282,6 +283,10 @@ export default function Stats() {
if (!data?.me?.id) return <></>
return (
<div className="flex w-full flex-col gap-y-8">




<LoadingWrapper
loading={fetchingYearlyStats}
fallback={<Skeleton className="h-48" />}
Expand Down
2 changes: 1 addition & 1 deletion ee/tabby-ui/app/(home)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function MainPanel() {
}

return (
<div className="flex flex-1 justify-center lg:mt-[10vh]">
<div className="lg:mt-[10vh]">
<div className="mx-auto flex w-screen flex-col px-5 py-20 lg:w-auto lg:flex-row lg:justify-center lg:gap-x-10 lg:px-0 lg:py-10">
<div className="relative mb-5 flex flex-col rounded-lg pb-4 lg:mb-0 lg:mt-12 lg:w-64">
<UserAvatar className="h-20 w-20 border-4 border-background" />
Expand Down
14 changes: 14 additions & 0 deletions ee/tabby-ui/app/search/components/search.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const mockData = {
question: "write a triangle with CSS",
answer: "The 'hubspot-api' library is not a preloaded package in HubSpot. Instead, you should use the '@hubspot/api-client' package. Here is an example of how to include it:\n\n```javascript\nconst hubspot = require('@hubspot/api-client');\nconst hubspotClient = new hubspot.Client({ apiKey: YOUR_API_KEY });\n```\n\nYou can find more information about the package in the [NPM reference](https://www.npmjs.com/package/@hubspot/api-client) and the [HubSpot Serverless Reference](https://developers.hubspot.com/docs/cms/data/serverless-functions/reference#preloaded-packages)."
}

export default function Search () {
return (
<div></div>
)
}

function QuestionAnswerPair () {

}
13 changes: 13 additions & 0 deletions ee/tabby-ui/app/search/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Metadata } from 'next'

import Search from './components/search'

export const metadata: Metadata = {
title: 'Search'
}

export default function SearchPage() {
return (
<Search />
)
}

0 comments on commit 6d313e8

Please sign in to comment.