Skip to content

Commit

Permalink
preproduction wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandros Coutsicos committed Nov 11, 2024
1 parent c4a79ad commit 2bd3231
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 17 deletions.
13 changes: 6 additions & 7 deletions next/app/(main)/empfangen/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,12 @@ async function getPageData() {
// limit: 3,
},
{
// next: {
// tags:
// process.env.NODE_ENV === "production" ? ["collection"] : undefined,
// },
cache: "no-store",
// cache:
// process.env.NODE_ENV === "production" ? "force-cache" : "no-store",
next: {
tags:
process.env.NODE_ENV === "production" ? ["collection"] : undefined,
},
cache:
process.env.NODE_ENV === "production" ? "force-cache" : "no-store",
}
);
// console.log("response", itemResponse);
Expand Down
9 changes: 6 additions & 3 deletions next/app/(main)/kontakt/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,17 +186,18 @@ export default async function KontaktPage(props) {
</View>
</View>
<View>
{data && data.contact_addresses && (
<View
style={{
flexDirection: "row",
flexWrap: "wrap",
justifyContent: "space-between",
// backgroundColor: "yellow",
paddingBottom:
Metrics.tripleBaseMargin - Metrics.doubleBaseMargin,
Metrics.baseMargin,
}}
>
{data.contact_addresses.map((item, index) => {
{ data.contact_addresses.map((item, index) => {
return (
<View
key={"contact" + index}
Expand Down Expand Up @@ -262,6 +263,8 @@ export default async function KontaktPage(props) {
);
})}
</View>
)
}
</View>
<View>
<Text
Expand Down Expand Up @@ -331,7 +334,7 @@ export default async function KontaktPage(props) {
>
{"Partnerorganisationen:"}
</Text>
{data.partner_logos && (
{data && data.partner_logos && (
<View style={{ flexDirection: "row" }}>
{data.partner_logos.map((item, index) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion next/app/(main)/mitglied-werden/Statement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function Statement(props) {
useEffect(() => {
setRandomIndex(Math.floor(Math.random() * props.statements.length));
}, []);
const randomStatment = props.statements[randomIndex];
const randomStatment = props.statements.length > 0 ? props.statements[randomIndex]: "No statments provided";

return (
<div
Expand Down
2 changes: 1 addition & 1 deletion next/app/(main)/mitglied-werden/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export default async function MitgliedPage(props) {
width: "43vw",
}}
>
<YearlyProduct memberProducts={memberProducts}></YearlyProduct>
<YearlyProduct memberProducts={memberProducts || []}></YearlyProduct>
</div>

<div
Expand Down
4 changes: 3 additions & 1 deletion next/app/(main)/programm/[date]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export default async function ProgramPage({ params }) {
}
}
>
{todayShows.map((show, index) => {
{todayShows && todayShows.map((show, index) => {
let isCurrentshow = show.starts === currentShow.starts;
return (
<View
Expand Down Expand Up @@ -374,6 +374,7 @@ export default async function ProgramPage({ params }) {
</View>
)}
</View>
{data &&(
<View
style={{
width: "70%",
Expand Down Expand Up @@ -459,6 +460,7 @@ export default async function ProgramPage({ params }) {
})}
</View>
</View>
)}
</View>
</View>
</View>
Expand Down
2 changes: 1 addition & 1 deletion next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"start": "node .next/standalone/server.js",
"syncDataModel": "node bin/syncDataModel.js",
"api": "swagger-typescript-api --responses --extract-request-body --extract-request-params --extract-response-body --extract-response-error -p http://localhost:1337/server/specs/oas -o ./lib/api --modular",
"postinstall": "patch-package"
Expand Down
6 changes: 3 additions & 3 deletions reloadNext.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
docker-compose stop next
docker-compose rm -f next
docker compose stop next
docker compose rm -f next
# docker-compose build --no-cache next # for rebuilding whole dockerfile (if .env changes)
docker-compose up -d --no-deps --build next
docker compose up -d --no-deps --build next

0 comments on commit 2bd3231

Please sign in to comment.