Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update footer #3160

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
120 changes: 0 additions & 120 deletions package-lock.json

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

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": "Поддержка"
}
12 changes: 7 additions & 5 deletions src/components/PageFooter/PageFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ 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
Loading