diff --git a/custom/react/Countdown.tsx b/custom/react/Countdown.tsx new file mode 100644 index 0000000..89c881e --- /dev/null +++ b/custom/react/Countdown.tsx @@ -0,0 +1,3 @@ +import Countdown from "./components/Countdown"; + +export default Countdown; diff --git a/custom/react/Menu.tsx b/custom/react/Menu.tsx new file mode 100644 index 0000000..7772223 --- /dev/null +++ b/custom/react/Menu.tsx @@ -0,0 +1,11 @@ +import React from "react"; + +const Menu = () => { + return ( +
+

Menu

+
+ ); +}; + +export default Menu; diff --git a/custom/react/components/Countdown/index.tsx b/custom/react/components/Countdown/index.tsx new file mode 100644 index 0000000..b67bc19 --- /dev/null +++ b/custom/react/components/Countdown/index.tsx @@ -0,0 +1,56 @@ +import React, { useState, useEffect } from "react"; + +interface CountdownProps { + //formato: dd/mm/yyyy/hh:mm + endDate: string; +} + +interface Time { + hour: number; + minute: number; + second: number; +} + +const Countdown = ({ endDate }: CountdownProps) => { + const [time, setTime] = useState