diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2021-07-21 04:42:31 -0500 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2021-07-21 04:42:31 -0500 |
| commit | f42a9a3052086a6369d6a5566c613fccc4d3c6d6 (patch) | |
| tree | c2dd378edf0b457d9da2ce6eb6c7b73d1c497cbf /templates/Default/index.tsx | |
| parent | 77c2f8e0640ea979d9e8d5f991a50dfcb7aa683f (diff) | |
Added a timestamp and sorts posts by timestamp
Diffstat (limited to 'templates/Default/index.tsx')
| -rw-r--r-- | templates/Default/index.tsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/templates/Default/index.tsx b/templates/Default/index.tsx index c30b26d..b600e57 100644 --- a/templates/Default/index.tsx +++ b/templates/Default/index.tsx @@ -7,6 +7,7 @@ import styles from './default.module.scss'; export type DefaultPage = { className?: string; path?: string; + lastUpdated?: string; }; export type RelPathProps = { @@ -37,11 +38,16 @@ const RelPath : FC<RelPathProps> = ({path, ...props}) => { ); } -const DefaultPage : FC<DefaultPage> = ({className, children, path, ...props}) => ( +const LastUpdatedDate : FC = ({children}) => ( + <span className={styles.date}><b>Last Updated: </b>{children}</span> +) + +const DefaultPage : FC<DefaultPage> = ({className, lastUpdated, children, path, ...props}) => ( <Viewport className={clsx(styles.viewportOverrides, className)} > {path !== undefined ? <RelPath path={path!} /> : undefined} + {lastUpdated ? <LastUpdatedDate>{lastUpdated}</LastUpdatedDate> : undefined} {children} </Viewport> ); |
