From 7bb9b8108c1cdbaaf4a9be0d42b162bfe0df27c4 Mon Sep 17 00:00:00 2001 From: Mateusz Baginski Date: Sun, 10 Nov 2024 17:43:39 +0100 Subject: [PATCH] feat(chat): add footer --- apps/chat/src/i18n/packs/i18n-lang-en.ts | 8 +++ apps/chat/src/i18n/packs/i18n-lang-pl.ts | 8 +++ apps/chat/src/layouts/footer/footer.tsx | 60 +++++++++++++++++++ apps/chat/src/layouts/footer/index.ts | 1 + .../layouts/page-with-navigation.layout.tsx | 6 +- 5 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 apps/chat/src/layouts/footer/footer.tsx create mode 100644 apps/chat/src/layouts/footer/index.ts diff --git a/apps/chat/src/i18n/packs/i18n-lang-en.ts b/apps/chat/src/i18n/packs/i18n-lang-en.ts index fe7112a1..cefda001 100644 --- a/apps/chat/src/i18n/packs/i18n-lang-en.ts +++ b/apps/chat/src/i18n/packs/i18n-lang-en.ts @@ -134,4 +134,12 @@ export const I18N_PACK_EN = deepmerge(I18N_FORWARDED_EN_PACK, { start: 'Start chat', selectModel: 'AI Model', }, + footer: { + copyright: 'Open Source AI Platform', + madeWith: 'Made with', + withAI: 'with AI', + github: 'GitHub', + blog: 'Blog', + docs: 'Documentation', + }, }); diff --git a/apps/chat/src/i18n/packs/i18n-lang-pl.ts b/apps/chat/src/i18n/packs/i18n-lang-pl.ts index 02d46952..f9642e59 100644 --- a/apps/chat/src/i18n/packs/i18n-lang-pl.ts +++ b/apps/chat/src/i18n/packs/i18n-lang-pl.ts @@ -136,4 +136,12 @@ export const I18N_PACK_PL: I18nLangPack = deepmerge(I18N_FORWARDED_PL_PACK, { start: 'Rozpocznij czat', selectModel: 'Model AI', }, + footer: { + copyright: 'Platforma AI Open Source', + madeWith: 'Stworzone z', + withAI: 'z AI', + github: 'GitHub', + blog: 'Blog', + docs: 'Dokumentacja', + }, }); diff --git a/apps/chat/src/layouts/footer/footer.tsx b/apps/chat/src/layouts/footer/footer.tsx new file mode 100644 index 00000000..cf62af25 --- /dev/null +++ b/apps/chat/src/layouts/footer/footer.tsx @@ -0,0 +1,60 @@ +import { UkIcon } from '@llm/ui'; +import { useI18n } from '~/i18n'; + +export function Footer() { + const t = useI18n().pack.footer; + + return ( + + ); +} diff --git a/apps/chat/src/layouts/footer/index.ts b/apps/chat/src/layouts/footer/index.ts new file mode 100644 index 00000000..a058eae0 --- /dev/null +++ b/apps/chat/src/layouts/footer/index.ts @@ -0,0 +1 @@ +export * from './footer'; diff --git a/apps/chat/src/layouts/page-with-navigation.layout.tsx b/apps/chat/src/layouts/page-with-navigation.layout.tsx index 3ed6fd73..3072e5f4 100644 --- a/apps/chat/src/layouts/page-with-navigation.layout.tsx +++ b/apps/chat/src/layouts/page-with-navigation.layout.tsx @@ -1,14 +1,16 @@ import type { PropsWithChildren } from 'react'; +import { Footer } from './footer'; import { Navigation } from './navigation'; export function PageWithNavigationLayout({ children }: PropsWithChildren) { return ( -
+
-
+
{children}
+
); }