mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-08-20 21:01:31 +02:00
Add typescript types for patterns
This commit is contained in:
@@ -4,7 +4,11 @@ import { Link } from 'react-router-dom';
|
||||
import useDocumentTitle from '../hooks/useDocumentTitle';
|
||||
import Layout from './Layout';
|
||||
|
||||
const DetailsLayout = ({ title, children }) => {
|
||||
interface DetailsLayoutProps {
|
||||
title: string;
|
||||
}
|
||||
|
||||
const DetailsLayout: React.FC<DetailsLayoutProps> = ({ title, children }) => {
|
||||
useDocumentTitle(`CSS Layout ∙ ${title}`);
|
||||
|
||||
return (
|
||||
|
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
|
||||
import Heading from '../components/Heading';
|
||||
|
||||
const Footer = () => {
|
||||
const Footer: React.FC<{}> = () => {
|
||||
return (
|
||||
<div className="bl br bb b--black-20 flex justify-between br4 br--bottom">
|
||||
<div className="br b--black-20" style={{ flex: 1 }}>
|
||||
|
@@ -2,7 +2,7 @@ import React, { useEffect } from 'react';
|
||||
|
||||
import Footer from './Footer';
|
||||
|
||||
const Layout = ({ children }) => {
|
||||
const Layout: React.FC<{}> = ({ children }) => {
|
||||
useEffect(() => {
|
||||
window.scrollTo(0, 0);
|
||||
}, []);
|
||||
|
Reference in New Issue
Block a user