Skip to content

Commit

Permalink
fix(Footer): update footer
Browse files Browse the repository at this point in the history
  • Loading branch information
Katrin-kudryash committed Feb 4, 2025
1 parent 533019a commit 8ba43c0
Show file tree
Hide file tree
Showing 8 changed files with 117 additions and 129 deletions.
2 changes: 2 additions & 0 deletions generated/kysely/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ export type AppConfig = {
id: string;
favicon: string | null;
logo: string | null;
supportLink: string | null;
documentLink: string | null;
};
export type Comment = {
id: string;
Expand Down
218 changes: 98 additions & 120 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"dom-objects": "1.2.0",
"easy-typed-intl": "1.0.3",
"gray-matter": "4.0.3",
"i18n": "0.15.1",
"jira-client": "8.2.2",
"kysely": "0.27.3",
"markdown-it": "14.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- AlterTable
ALTER TABLE "AppConfig" ADD COLUMN "documentLink" TEXT,
ADD COLUMN "supportLink" TEXT;
3 changes: 3 additions & 0 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,9 @@ model AppConfig {
id String @id @default(cuid())
favicon String?
logo String?
supportLink String?
documentLink String?
}

model ExternalTask {
Expand Down
4 changes: 2 additions & 2 deletions src/components/PageFooter/PageFooter.i18n/en.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"Feedback": "Feedback",
"Terms": "Terms",
"Docs": "Docs",
"Contact SD Goals": "Contact SD Goals",
"API": "API",
"About": "About",
"Locale change title": "Ru",
"Contact us": "",
"Organization": "SD Goals"
"Organization": "SD Goals",
"Support": ""
}
4 changes: 2 additions & 2 deletions src/components/PageFooter/PageFooter.i18n/ru.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"Feedback": "Обратная связь",
"Terms": "Условия",
"Docs": "Документация",
"Contact SD Goals": "Контакты",
"API": "API",
"About": "О нас",
"Locale change title": "En",
"Contact us": "Связаться с нами",
"Organization": "SD Goals"
"Organization": "SD Goals",
"Support": "Поддержка"
}
11 changes: 6 additions & 5 deletions src/components/PageFooter/PageFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ import s from './PageFooter.module.css';
import { tr } from './PageFooter.i18n';

export const PageFooter: FC = () => {
const config = trpc.appConfig.get.useQuery(undefined, {
staleTime: Infinity,
});
const menuItems = [
{ title: tr('Terms'), url: '/terms' },
{ title: tr('Docs'), url: '/docs' },
{ title: tr('Contact us'), url: '/contactTaskany' },
{ title: tr('API'), url: '/api' },
{ title: tr('About'), url: '/about' },
{ title: tr('Docs'), url: config.data?.documentLink ?? undefined },
{ title: tr('Support'), url: config.data?.supportLink ?? undefined },
{ title: tr('API'), url: '/api-docs' },
];

const router = useRouter();
Expand Down

0 comments on commit 8ba43c0

Please sign in to comment.