Skip to content

Commit

Permalink
chore(app): fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcnk committed Mar 30, 2024
1 parent 67f7d24 commit fc994c0
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 151 deletions.
18 changes: 0 additions & 18 deletions src/app/api/glossary/route.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/app/api/i18n/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ const en: Dictionary = {
unknown: 'Unknown',
menu: 'Menu',
blog: 'Blog',
glossary: 'Glossary',
minRead: '{min} min',
myAccounts: 'My Accounts',
addAccount: 'Add Account',
Expand Down
1 change: 0 additions & 1 deletion src/app/api/i18n/locales/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ const pl: Dictionary = {
unknown: 'Nieznana',
menu: 'Menu',
blog: 'Blog',
glossary: 'Słownik',
minRead: '{min} min',
myAccounts: 'Moje konta',
addAccount: 'Dodaj konto',
Expand Down
1 change: 0 additions & 1 deletion src/app/api/i18n/locales/tr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ const tr: Dictionary = {
unknown: 'Bilinmeyen',
menu: 'Menü',
blog: 'Blog',
glossary: 'Sözlük',
minRead: '{min} dk',
myAccounts: 'Hesaplarım',
addAccount: 'Hesap Ekle',
Expand Down
1 change: 0 additions & 1 deletion src/app/api/i18n/locales/uk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ const uk: Dictionary = {
unknown: 'Невідомо',
menu: 'Меню',
blog: 'Блог',
glossary: 'Глосарій',
minRead: '{min} хв',
myAccounts: 'Мої аккаунти',
addAccount: 'Додати аккаунт',
Expand Down
1 change: 0 additions & 1 deletion src/app/api/i18n/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export const localeSchema = z.object({
unknown: z.string(),
menu: z.string(),
blog: z.string(),
glossary: z.string(),
minRead: z.string(),
myAccounts: z.string(),
addAccount: z.string(),
Expand Down
11 changes: 0 additions & 11 deletions src/app/api/search/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { NextRequest, NextResponse } from 'next/server'
import { fetchAccounts } from '@/data/accounts'
import { Network } from '@/data/api'
import { fetchTransactions } from '@/data/transactions'
import { pocketbase } from '@/lib/pocketbase'

export async function GET(request: NextRequest) {
const networkRaw = request.headers.get('minaverse-network')
Expand All @@ -13,16 +12,6 @@ export async function GET(request: NextRequest) {
if (query.length < 3) {
return NextResponse.json({ found: false, query })
}
const glossaryTerms = await pocketbase
.collection('glossary_terms')
.getFullList({ sort: 'term', filter: `term~'${query}'`, requestKey: null })
if (glossaryTerms.length > 0) {
return NextResponse.json({
found: true,
type: 'glossary',
id: glossaryTerms[0].term
})
}
if (query.length < 48) return NextResponse.json({ found: false, query })
const accounts = await fetchAccounts({
length: 1,
Expand Down
95 changes: 0 additions & 95 deletions src/app/glossary/page.tsx

This file was deleted.

15 changes: 1 addition & 14 deletions src/components/commands.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,6 @@ export const Commands = () => {
onSelect: () => router.push('/staking'),
testId: 'commands__staking'
},
{
label: t('common.blog'),
onSelect: () => router.push('/blog'),
testId: 'commands__blog'
},
{
label: t('common.glossary'),
onSelect: () => router.push('/glossary'),
testId: 'commands__glossary'
},
{
label: t('common.settings'),
onSelect: () => setSettingsOpen(true),
Expand Down Expand Up @@ -119,10 +109,7 @@ export const Commands = () => {
: `${searchResult?.type} (${searchResult?.id})`

const searchResultUrl =
searchResult &&
['accounts', 'transactions'].includes(searchResult.type || '')
? `/${network}/${searchResult.type}/${searchResult.id}`
: `/glossary?search=${searchResult?.id}`
searchResult && `/${network}/${searchResult?.type}/${searchResult?.id}`

return (
<CommandDialog open={commandsOpen} onOpenChange={setCommandsOpen}>
Expand Down
8 changes: 0 additions & 8 deletions src/components/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/* eslint-disable react/jsx-no-literals */
import NextImage from 'next/image'
import NextLink from 'next/link'

import { FooterOptions } from '@/components/footer-options'
import { ServiceLinks } from '@/components/service-links'
import { Button } from '@/components/ui/button'
import { getT } from '@/lib/i18n/server'

export const Footer = async () => {
Expand Down Expand Up @@ -38,12 +36,6 @@ export const Footer = async () => {
</div>
<div className="flex flex-1 flex-col gap-2 items-start">
<h4 className="text-lg">Edu</h4>
<Button variant="link" className="p-0 text-md" asChild>
<NextLink href="/blog">{t('common.blog')}</NextLink>
</Button>
<Button variant="link" className="p-0 text-md">
<NextLink href="/glossary">{t('common.glossary')}</NextLink>
</Button>
</div>
</div>
<div className="text-center py-2">
Expand Down

0 comments on commit fc994c0

Please sign in to comment.