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

Devrel 1236/create jumpstart app #1

Merged
merged 56 commits into from
Dec 4, 2024
Merged
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
c834f9c
add colors and fonts to tailwind theme
IvanKiral Nov 5, 2024
8c72f9f
Add header and container components
IvanKiral Nov 5, 2024
5d87c97
Add HeroImage component
IvanKiral Nov 5, 2024
0e0afc3
add video component
IvanKiral Nov 6, 2024
801d509
add featured article and event
IvanKiral Nov 6, 2024
b03fccf
remove padding from container
IvanKiral Nov 6, 2024
bb33beb
extract logo an navigation into components
IvanKiral Nov 6, 2024
5263763
add footer
IvanKiral Nov 6, 2024
1a74b3c
Refactoring and responsive design
IvanKiral Nov 7, 2024
1c59d2f
add delivery sdk and add options to for formatting
IvanKiral Nov 7, 2024
8b449a9
add generated model from environment
IvanKiral Nov 7, 2024
b7fc592
update app to use data from kontent.ai
IvanKiral Nov 7, 2024
ef1a1c8
fix typography
IvanKiral Nov 11, 2024
0f2c067
use rich text resolver for rich text elements
IvanKiral Nov 11, 2024
ce95b06
make adding content interactive interactive
IvanKiral Nov 11, 2024
e12f45d
fixup navigation keys
IvanKiral Nov 11, 2024
e0614f3
regenarete model and update video component
IvanKiral Nov 11, 2024
8954d85
fix component rendering when partial content
IvanKiral Nov 11, 2024
5f118bd
update index html title
IvanKiral Nov 11, 2024
993a0d8
fixup page content space
IvanKiral Nov 11, 2024
0431f19
remove unnecesray log
IvanKiral Nov 11, 2024
aa6fadf
update model
IvanKiral Nov 11, 2024
9e1975d
Fix video autoplay
IvanKiral Nov 11, 2024
8e6a3ce
Fix video iframe when non-existing link
IvanKiral Nov 12, 2024
4c86de9
add react router
IvanKiral Nov 12, 2024
e0e17bb
add context for environment parameters
IvanKiral Nov 12, 2024
7831e93
use simple router to get to the page
IvanKiral Nov 12, 2024
cc8a0e8
add auth0 dependencies
IvanKiral Nov 12, 2024
d4ad528
implement change environmentId
IvanKiral Nov 12, 2024
3f0b266
add vercel.json
IvanKiral Nov 12, 2024
d61b543
update filtering of items
IvanKiral Nov 13, 2024
cfac2ef
regenerate model to change event's asset to image
IvanKiral Nov 13, 2024
669b8f0
fix pageContent alignment
IvanKiral Nov 13, 2024
437b1e2
make app more robust for content type element's mistakes
IvanKiral Nov 13, 2024
cd5ff0d
fixup return filtering for landing_page
IvanKiral Nov 13, 2024
11075db
fix tag coloring
IvanKiral Nov 13, 2024
afa37b3
add space in landing page body_copy
IvanKiral Nov 13, 2024
ceae304
add images alt
IvanKiral Nov 13, 2024
61e5ec0
add title for iframe
IvanKiral Nov 13, 2024
26bff09
add meta description
IvanKiral Nov 13, 2024
0d5f521
redirect after popup login
IvanKiral Nov 19, 2024
655b197
use suspense for one continuous loader
IvanKiral Nov 19, 2024
c2a8c3c
update event color
IvanKiral Nov 19, 2024
7ac2df8
add robots.txt
IvanKiral Nov 19, 2024
f09ab86
add static sizes to images
IvanKiral Nov 19, 2024
2c37319
update richtext style for other elments
IvanKiral Nov 19, 2024
1d74475
update readme and env template
IvanKiral Nov 20, 2024
f236739
add lint and build github workflow
IvanKiral Nov 20, 2024
acc6e32
temporalily use default eslint
IvanKiral Nov 22, 2024
5c76a92
update link to data-ops in readme
IvanKiral Nov 22, 2024
a2e4ee0
add robustness with messages when type is missing element
IvanKiral Nov 22, 2024
f39179f
change images to use webp format
IvanKiral Nov 22, 2024
98d481f
update body_copy to be in page section
IvanKiral Dec 3, 2024
020ee6c
update landing page item filter option
IvanKiral Dec 3, 2024
affb158
change jumpstart to kickstart
IvanKiral Dec 4, 2024
fd62436
fix environment variable name
IvanKiral Dec 4, 2024
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
Prev Previous commit
Next Next commit
update landing page item filter option
  • Loading branch information
IvanKiral committed Dec 3, 2024
commit 020ee6cf69a39f9bc134efd2505466ef1e89f594
9 changes: 6 additions & 3 deletions src/pages/LandingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { useAppContext } from "../context/AppContext";
import { Replace } from "../utils/types";
import RenderElement from "../components/RenderElement";
import FeaturedContent from "../components/FeaturedContent";
import { contentTypes } from "../model/project";

const LandingPage: FC = () => {
const { environmentId, apiKey } = useAppContext();
Expand All @@ -22,9 +23,11 @@ const LandingPage: FC = () => {
queryKey: ["landing_page"],
queryFn: () =>
createClient(environmentId, apiKey)
.item("landing_page")
.items()
.type(contentTypes.landing_page.codename)
.limitParameter(1)
.toPromise()
.then(res => res.data.item as Replace<LandingPage, { elements: Partial<LandingPage["elements"]> }>)
.then(res => res.data.items[0] as Replace<LandingPage, { elements: Partial<LandingPage["elements"]> }> ?? null)
.catch((err) => {
if (err instanceof DeliveryError) {
return null;
Expand Down Expand Up @@ -56,7 +59,7 @@ const LandingPage: FC = () => {
errorMessageClassName="container"
>
<PageSection color="bg-white">
<PageContent body={landingPage.data.elements.body_copy!} />
<PageContent body={landingPage.data.elements.body_copy!} />
</PageSection>
</RenderElement>
<RenderElement
Expand Down
Loading