Skip to content

Commit

Permalink
chore: Update .gitignore and package.json, fix API endpoint, and remo…
Browse files Browse the repository at this point in the history
…ve unused code
  • Loading branch information
bramses committed Aug 10, 2024
1 parent 2db938c commit bdc39be
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ yarn-error.log*
# local env files
.env*.local

# prod env files
.env*.production

# local folder
local

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"dev:next": "next dev",
"dev": "run-p dev:*",
"build": "next build",
"build:nolint": "NEXT_PUBLIC_DISABLE_LINT=true next build",
"start": "next start",
"build-stats": "cross-env ANALYZE=true npm run build",
"clean": "rimraf .next .swc out coverage",
Expand Down
2 changes: 1 addition & 1 deletion src/app/[locale]/(auth)/api/search/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { logger } from '@/libs/Logger';
export const POST = async (request: Request) => {
const { query, dbPath } = await request.json();

const resp = await fetch('http://localhost:8088/search', {
const resp = await fetch('https://api-gateway-electron.onrender.com/search', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Expand Down
1 change: 0 additions & 1 deletion src/components/Entries.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const Entries = ({ searchResults, onDelve }: EntriesProps) => {
title={entry.metadata.title}
author={entry.metadata.author}
createdAt={entry.createdAt}
updatedAt={entry.updatedAt}
similarity={entry.similarity}
hasYouTubeEmbed={entry.metadata.author.includes('youtube.com')}
youtubeId={
Expand Down
12 changes: 8 additions & 4 deletions src/components/Entry.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/* eslint-disable @next/next/no-img-element */
/* eslint-disable jsx-a11y/img-redundant-alt */
/* eslint-disable unused-imports/no-unused-vars */
/* eslint-disable import/no-extraneous-dependencies */

'use client';

import 'react-lite-youtube-embed/dist/LiteYouTubeEmbed.css';
Expand All @@ -8,7 +13,7 @@ import { Tweet } from 'react-tweet';

const Entry = ({
hasAliases: initialHasAliases = false,
hasCollections: initialHasCollections = false,
// hasCollections: initialHasCollections = false,
hasYouTubeEmbed: initialHasYouTubeEmbed = false,
hasTwitterEmbed: initialHasTwitterEmbed = false,
tweetId = '',
Expand All @@ -18,14 +23,13 @@ const Entry = ({
title = '',
author = '',
createdAt = '',
updatedAt = '',
similarity = 0,
imageUrl = '',
hasImage = false,
onDelve = (delveData: string) => {},
onDelve = (_: string) => {},
}) => {
const [hasAliases] = useState(initialHasAliases);
const [hasCollections, setHasCollections] = useState(initialHasCollections);
// const [hasCollections] = useState(initialHasCollections);
const [hasYouTubeEmbed] = useState(initialHasYouTubeEmbed);
const [hasTwitterEmbed] = useState(initialHasTwitterEmbed);

Expand Down
3 changes: 2 additions & 1 deletion src/components/SearchBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const SearchBox = () => {
body: JSON.stringify({
query,
dbPath:
'/Users/bram/Dropbox/PARA/Projects/api-gateway-local-build/api-gateway-electron/yourcommonbase.db',
// '/Users/bram/Dropbox/PARA/Projects/api-gateway-local-build/api-gateway-electron/yourcommonbase.db',
'/var/data/db1.db',
}),
});
console.log('response:', response);
Expand Down
4 changes: 0 additions & 4 deletions src/templates/BaseTemplate.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import { useTranslations } from 'next-intl';

import { AppConfig } from '@/utils/AppConfig';

const BaseTemplate = (props: {
leftNav: React.ReactNode;
rightNav?: React.ReactNode;
children: React.ReactNode;
}) => {
const t = useTranslations('BaseTemplate');

return (
<div className="w-full px-1 text-gray-700 antialiased">
<div className="mx-auto max-w-screen-md">
Expand Down

0 comments on commit bdc39be

Please sign in to comment.