From 9a8b38c18a1853cdb63c7245fa8cc19735d2b569 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 16 Sep 2021 16:29:20 +0200 Subject: refactor utils --- src/views/Detail.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/views/Detail.js') diff --git a/src/views/Detail.js b/src/views/Detail.js index b1c4dcf..70f4561 100644 --- a/src/views/Detail.js +++ b/src/views/Detail.js @@ -7,6 +7,7 @@ import React from "react"; import Gallery from "./Gallery.js"; import Clocks from "./Clocks.js"; import Vimeo from "@u-wave/react-vimeo"; +import { pad } from "../utils/index.js"; export default function Detail({ node, visible, onClose }) { if (!node) { @@ -59,12 +60,3 @@ export default function Detail({ node, visible, onClose }) { ); } - -const pad = (value) => (value < 10 ? "0" + value : value); -const capitalizeWord = (text = "") => - text ? text.charAt(0).toUpperCase() + text.slice(1) : ""; -const capitalize = (text = "") => - String(text || "") - .split(" ") - .map(capitalizeWord) - .join(" "); -- cgit v1.2.3-70-g09d2