diff --git a/.gitignore b/.gitignore index 534e7a1..b1793fa 100644 --- a/.gitignore +++ b/.gitignore @@ -44,6 +44,9 @@ yarn-error.log* # local env files .env*.local +# prod env files +.env*.production + # local folder local diff --git a/package.json b/package.json index 271b5d5..abebaae 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/app/[locale]/(auth)/api/search/route.ts b/src/app/[locale]/(auth)/api/search/route.ts index 9919218..c1e23b5 100644 --- a/src/app/[locale]/(auth)/api/search/route.ts +++ b/src/app/[locale]/(auth)/api/search/route.ts @@ -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', diff --git a/src/components/Entries.tsx b/src/components/Entries.tsx index ba34f8b..938ffa5 100644 --- a/src/components/Entries.tsx +++ b/src/components/Entries.tsx @@ -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={ diff --git a/src/components/Entry.tsx b/src/components/Entry.tsx index 61e2efb..675aae4 100644 --- a/src/components/Entry.tsx +++ b/src/components/Entry.tsx @@ -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'; @@ -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 = '', @@ -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); diff --git a/src/components/SearchBox.tsx b/src/components/SearchBox.tsx index 23195bf..f46d024 100644 --- a/src/components/SearchBox.tsx +++ b/src/components/SearchBox.tsx @@ -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); diff --git a/src/templates/BaseTemplate.tsx b/src/templates/BaseTemplate.tsx index 51db2d5..98d7df6 100644 --- a/src/templates/BaseTemplate.tsx +++ b/src/templates/BaseTemplate.tsx @@ -1,5 +1,3 @@ -import { useTranslations } from 'next-intl'; - import { AppConfig } from '@/utils/AppConfig'; const BaseTemplate = (props: { @@ -7,8 +5,6 @@ const BaseTemplate = (props: { rightNav?: React.ReactNode; children: React.ReactNode; }) => { - const t = useTranslations('BaseTemplate'); - return (