Skip to content
Open
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
15 changes: 6 additions & 9 deletions app/components/homePage/FooterSection.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
import type { FooterSection } from '~/graphql/types'
import type { FC } from 'react'
import { PrototypIcon } from '~/assets/PrototypIcon'

interface Props {
footerSection: FooterSection
}

export const FooterSectionComponent: FC<Props> = ({ footerSection }) => {
export const FooterSectionComponent: FC = () => {
return (
<footer className="block bg-richBlack">
<div className="relative isolate">
<div className="mx-auto max-w-7xl px-6 py-12">
<div className="flex items-center">
<PrototypIcon />
<p className="ml-4 text-sm font-light text-white md:ml-7">
<div className="flex flex-col-reverse items-center gap-8 sm:flex-row sm:items-center sm:gap-0">
<div className="shrink-0">
<PrototypIcon />
</div>
<p className="ml-4 px-4 text-center text-sm font-light text-white sm:px-0 sm:text-left md:ml-7">
Eventblender is a service built by Prototyp. Prototyp is a code lab building digital
products for businesses breaking new ground.
</p>
Expand Down
8 changes: 7 additions & 1 deletion app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { LinksFunction, LoaderArgs, MetaFunction } from '@remix-run/node'
import { json } from '@remix-run/node'
import { Links, LiveReload, Meta, Outlet, Scripts, ScrollRestoration } from '@remix-run/react'
import { getUser } from './session.server'
import { FooterSectionComponent } from './components/homePage/FooterSection'

import tailwindStylesheetUrl from './styles/tailwind.css'

Expand Down Expand Up @@ -31,7 +32,12 @@ export default function App() {
<Links />
</head>
<body className="h-full">
<Outlet />
<div className="flex min-h-screen flex-col">
<div className="mb-4 flex-auto">
<Outlet />
</div>
<FooterSectionComponent />
</div>
<ScrollRestoration />
<Scripts />
<LiveReload />
Expand Down
6 changes: 3 additions & 3 deletions app/routes/events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ export default function Events() {
</header>

{/* Main content */}
<div className="flex flex-1 items-stretch overflow-hidden">
<main className="flex-1 overflow-y-auto">
<div className="flex flex-1 items-stretch">
<main className="flex-1">
{/* Primary column */}
<section
aria-labelledby="primary-heading"
className="flex h-full min-w-0 flex-1 flex-col lg:order-last"
className="flex min-w-0 flex-1 flex-col lg:order-last"
>
<h1 id="primary-heading" className="sr-only">
Events
Expand Down
11 changes: 6 additions & 5 deletions app/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ import { redirect } from '@remix-run/node'
import { json } from '@remix-run/node'
import { useLoaderData } from '@remix-run/react'
import { Navbar } from '~/components/NavBar'
import { FooterSectionComponent } from '~/components/homePage/FooterSection'
import { HeroSectionComponent } from '~/components/homePage/HeroSection'
import { USPsSection } from '~/components/homePage/USPsSection'
import { graphqlQuery } from '~/graphql/client'
import { GET_PAGE_QUERY, GET_PAGE_SETTINGS_QUERY } from '~/graphql/operations'
import type {
FooterSection,
GetPageQuery,
GetPageSettingsQuery,
HeroSection,
Expand Down Expand Up @@ -46,21 +44,24 @@ export async function loader({ request }: LoaderArgs) {
export default function Index() {
const { pageSettings, page } = useLoaderData<LoaderData>()

const sections = page.pageCollection?.items[0]?.sectionsCollection?.items || []
const contentSections = sections.filter(
(section) => section?.__typename === 'HeroSection' || section?.__typename === 'WhatWeDoSection'
)

return (
<>
<header>
<Navbar pageSettings={pageSettings} isDifferentBackgroundColor />
</header>

<main>
{page.pageCollection?.items[0]?.sectionsCollection?.items.map((section, index: number) => {
{contentSections.map((section, index: number) => {
switch (section?.__typename) {
case 'HeroSection':
return <HeroSectionComponent key={index} heroSection={section as HeroSection} />
case 'WhatWeDoSection':
return <USPsSection key={index} whatWeDoSection={section as WhatWeDoSection} />
case 'FooterSection':
return <FooterSectionComponent key={index} footerSection={section as FooterSection} />
default:
return <></>
}
Expand Down
Loading