Skip to content

Commit

Permalink
Merge branch 'fix-color-error' of https://github.com/ScilifelabDataCe…
Browse files Browse the repository at this point in the history
  • Loading branch information
JanProgrammierung committed Oct 14, 2024
2 parents 2a7377e + a759924 commit b8857c9
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 15 deletions.
7 changes: 4 additions & 3 deletions next-app/src/app/about/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BODY_CLASSES } from "@/constants";
import "../globals.css";
import AboutPageComponent from "@/components/AboutPageComponent";

import { LastUpdated } from "@/components/common/last-updated";

export default function RootLayout({
children,
Expand All @@ -10,8 +10,9 @@ export default function RootLayout({
}>) {
return (
<div className={BODY_CLASSES}>
<AboutPageComponent />
{children}
<AboutPageComponent />
{children}
<LastUpdated date="11-11-2024" />
</div>
);
}
2 changes: 2 additions & 0 deletions next-app/src/app/accessclinicaldata/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { BODY_CLASSES } from "@/constants";
import Link from "next/link";
import { ILink } from "@/interfaces/types";
import { TrackPageViewIfEnabled } from "@/util/cookiesHandling";
import { LastUpdated } from "@/components/common/last-updated";

export default function AboutPage(): ReactElement {
TrackPageViewIfEnabled();
Expand Down Expand Up @@ -153,6 +154,7 @@ export default function AboutPage(): ReactElement {
</a>
</li>
</ul>
<LastUpdated date="11-11-2024" />
</div>
);
}
26 changes: 14 additions & 12 deletions next-app/src/app/datasources/page.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
'use client';
"use client";

import { ReactElement } from 'react';
import { TrackPageViewIfEnabled } from '@/util/cookiesHandling';
import DataSourcesComponent from '@/components/DataSourcesComponent';
import { BODY_CLASSES } from '@/constants'
import { ReactElement } from "react";
import { TrackPageViewIfEnabled } from "@/util/cookiesHandling";
import DataSourcesComponent from "@/components/DataSourcesComponent";
import { BODY_CLASSES } from "@/constants";
import { LastUpdated } from "@/components/common/last-updated";

export default function DataPage(): ReactElement {
TrackPageViewIfEnabled();
TrackPageViewIfEnabled();

return (
<div className={BODY_CLASSES + " py-16"}>
<DataSourcesComponent />
</div>
);
}
return (
<div className={BODY_CLASSES + " py-16"}>
<DataSourcesComponent />
<LastUpdated date="11-11-2024" />
</div>
);
}
2 changes: 2 additions & 0 deletions next-app/src/app/eventsandtrainings/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import CardComponent from "@/components/CardComponent";
import { TrackPageViewIfEnabled } from "@/util/cookiesHandling";
import { BODY_CLASSES, H_1 } from "@/constants";
import Link from "next/link";
import { LastUpdated } from "@/components/common/last-updated";

const nbisImage = "/Partner logo/nbislogo_orange_txt_3cb0778d90.svg";
const scilifelabImage = "/Partner logo/SciLifeLab_Logotype_Green_POS.png";
Expand Down Expand Up @@ -225,6 +226,7 @@ export default function EventsAndTrainingsPage(): ReactElement {
</div>
))}
</div>
<LastUpdated date="11-11-2024" />
</div>
);
}
2 changes: 2 additions & 0 deletions next-app/src/app/registries/PageClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { useState } from "react";
import { useSearchParams } from "next/navigation";
import { RegistrySources, RegistrySourcesFilters } from "@/interfaces/types";
import { LastUpdated } from "@/components/common/last-updated";

const filters: RegistrySourcesFilters = {
registryCentre: [
Expand Down Expand Up @@ -265,6 +266,7 @@ export default function DataPageClient({
</div>
</div>
</div>
<LastUpdated date="11-11-2024" />
</div>
);
}
26 changes: 26 additions & 0 deletions next-app/src/components/common/last-updated.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import * as React from "react";
import { cn } from "@/lib/utils";

export interface LastUpdatedProps extends React.HTMLAttributes<HTMLDivElement> {
date?: string;
}

const LastUpdated = React.forwardRef<HTMLDivElement, LastUpdatedProps>(
({ className, date = "2024-10-09", ...props }, ref) => {
return (
<div
ref={ref}
className={cn(
"mt-auto py-4 text-center text-sm text-muted-foreground",
className
)}
{...props}
>
Last updated on {date}
</div>
);
}
);
LastUpdated.displayName = "LastUpdated";

export { LastUpdated };

0 comments on commit b8857c9

Please sign in to comment.