diff --git a/src/components/pages/AppHome/AppFooter.tsx b/src/components/pages/AppHome/AppFooter.tsx deleted file mode 100644 index e4550e56f9..0000000000 --- a/src/components/pages/AppHome/AppFooter.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import { Flex, Link, Spacer, Text } from '@chakra-ui/react'; -import { Trans, useTranslation } from 'react-i18next'; -import { URL_DECENT } from '../../../constants/url'; -import ExternalLink from '../../ui/links/ExternalLink'; -import Divider from '../../ui/utils/Divider'; - -export function AppFooter() { - const { t } = useTranslation('home'); - return ( - - - - - - Made with 💜 by - - Decent DAO - - - - - {t('audit')} - - | - - - {import.meta.env.VITE_APP_GIT_HASH.substring(0, 7)} - - - - ); -} diff --git a/src/components/ui/links/ExternalLink.tsx b/src/components/ui/links/ExternalLink.tsx index 3e71fdf7f4..a534b4cdfd 100644 --- a/src/components/ui/links/ExternalLink.tsx +++ b/src/components/ui/links/ExternalLink.tsx @@ -1,6 +1,11 @@ import { Link, LinkProps } from '@chakra-ui/react'; +import { Ref, forwardRef } from 'react'; -export default function ExternalLink({ children, ...rest }: LinkProps) { +export default function ExternalLink({ + children, + internalRef, + ...rest +}: LinkProps & { internalRef?: Ref }) { return ( {children} ); } + +export const ExtrernalLinkWrappable = forwardRef(({ children, ...props }: LinkProps, ref) => ( + + {children} + +)); +ExtrernalLinkWrappable.displayName = 'ExtrernalLinkWrappable'; diff --git a/src/components/ui/page/Footer.tsx b/src/components/ui/page/Footer.tsx new file mode 100644 index 0000000000..dedf06da36 --- /dev/null +++ b/src/components/ui/page/Footer.tsx @@ -0,0 +1,63 @@ +import { Flex, Text, Tooltip } from '@chakra-ui/react'; +import { useTranslation } from 'react-i18next'; +import { URL_DECENT } from '../../../constants/url'; +import ExternalLink, { ExtrernalLinkWrappable } from '../links/ExternalLink'; +import { DecentFooterLogo } from '../proposal/Icons'; + +export function Footer() { + const { t } = useTranslation('home'); + const commitHash = import.meta.env.VITE_APP_GIT_HASH; + return ( + + {t('audit')} + + + {commitHash.substring(0, 7)} + + + + + {t('homeAttribution')} + + + {/* @todo This should be replaced with proper logo that will include DAO word */} + + + DAO + + + + + ); +} diff --git a/src/components/ui/page/Layout/index.tsx b/src/components/ui/page/Layout/index.tsx index b4355fcd37..ed6fe401ba 100644 --- a/src/components/ui/page/Layout/index.tsx +++ b/src/components/ui/page/Layout/index.tsx @@ -1,9 +1,10 @@ import { Box, Container, Grid, GridItem, Show } from '@chakra-ui/react'; import { Outlet } from 'react-router-dom'; -import { CONTENT_HEIGHT, HEADER_HEIGHT } from '../../../../constants/common'; +import { CONTENT_HEIGHT, FOOTER_HEIGHT, HEADER_HEIGHT } from '../../../../constants/common'; import { useFractal } from '../../../../providers/App/AppProvider'; import { ErrorBoundary } from '../../utils/ErrorBoundary'; import { TopErrorFallback } from '../../utils/TopErrorFallback'; +import { Footer } from '../Footer'; import Header from '../Header'; import { NavigationLinks } from '../Navigation/NavigationLinks'; @@ -13,63 +14,66 @@ export default function Layout() { } = useFractal(); return ( - + - - - } - showDialog + - - - - - - } + showDialog + > + + + + + + +
+ + + + -
- - - - - - - - - + + + + + +