aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/Default/index.tsx17
1 files changed, 9 insertions, 8 deletions
diff --git a/templates/Default/index.tsx b/templates/Default/index.tsx
index f693da2..6a307ab 100644
--- a/templates/Default/index.tsx
+++ b/templates/Default/index.tsx
@@ -4,10 +4,11 @@ import { Breadcrumbs, LinkCrumb } from "../../components/Breadcrumbs";
import Viewport from "../../components/ViewPort";
import styles from './default.module.scss';
-export type DefaultPage = {
+export type DefaultPageProps = {
className?: string;
path?: string;
lastUpdated?: string;
+ children?: React.ReactChild;
};
export type RelPathProps = {
@@ -16,17 +17,17 @@ export type RelPathProps = {
const RelPath : FC<RelPathProps> = ({path, ...props}) => {
const _path = path[path.length - 1] === '/' ? path.substr(0, path.length - 1) : path;
-
+
const parts = _path.split('/');
const rels = [''];
-
+
for(let i = 1; i < parts.length; i++) {
rels.push([rels[i - 1], parts[i]].join('/'));
}
-
+
rels[0] = '/';
parts[0] = 'flu0r1ne.net';
-
+
return (
<Breadcrumbs>
{rels.map((relHref, i) => (
@@ -38,11 +39,11 @@ const RelPath : FC<RelPathProps> = ({path, ...props}) => {
);
}
-const LastUpdatedDate : FC = ({children}) => (
+const LastUpdatedDate : FC<{ children: React.ReactNode }> = ({children}) => (
<span className={styles.date}><b>Last Updated: </b>{children}</span>
)
-const DefaultPage : FC<DefaultPage> = ({className, lastUpdated, children, path, ...props}) => (
+const DefaultPage : FC<DefaultPageProps> = ({className, lastUpdated, children, path, ...props}) => (
<Viewport
className={clsx(styles.viewportOverrides, className)}
>
@@ -52,4 +53,4 @@ const DefaultPage : FC<DefaultPage> = ({className, lastUpdated, children, path,
</Viewport>
);
-export default DefaultPage; \ No newline at end of file
+export default DefaultPage;