Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #97 from OcularEngineering/date-bug
Browse files Browse the repository at this point in the history
Fix Date Bug
  • Loading branch information
MichaelMoyoMushabati authored May 22, 2024
2 parents c3c97b3 + a1f0ab6 commit 4db64cc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/ocular-ui/components/date-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function DatePickerWithRange({
formatDateFns(resultFilterDate.from, "LLL dd, y")
)
) : (
<span>Pick a date</span>
<span>Anytime</span>
)}
<ChevronDownIcon className={`h-4 ${isSelected ? 'rotate-180' : ''}`} />
</Button>
Expand Down
3 changes: 2 additions & 1 deletion packages/ocular-ui/pages/dashboard/marketplace/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { Button } from "@/components/ui/button";
import api from "@/services/admin-api";
import { IconChevronLeft, IconExternalLink } from '@supabase/ui';
import WebConnector from '@/components/marketplace/webConnector';
import { formatLabel } from '@/lib/utils';

interface Link {
location: string;
Expand Down Expand Up @@ -150,7 +151,7 @@ function Integration() {
height={56}
className="bg-scale-400 size-14"
/>
<h1 className="font-heading sm:text-2xl md:text-3xl">{integration.name}</h1>
<h1 className="font-heading sm:text-2xl md:text-3xl">{formatLabel(integration.name)}</h1>
</div>

{authorized? (
Expand Down
8 changes: 6 additions & 2 deletions packages/ocular-ui/services/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,15 @@ export default {
const body = {
context: {
top: 20,
ai_completion: true,
date: date,
ai_completion: true
// date: date,
},
q: q
};
console.log('Date here', date);
if (date.from || date.to) {
body.context.date = date;
}
if (sources && sources.length > 0) {
body.context.sources = sources;
}
Expand Down

0 comments on commit 4db64cc

Please sign in to comment.