diff --git a/.sdkmanrc b/.sdkmanrc new file mode 100644 index 0000000..5ecad56 --- /dev/null +++ b/.sdkmanrc @@ -0,0 +1,3 @@ +# Enable auto-env through the sdkman_auto_env config +# Add key=value pairs of SDKs to use below +java=21.ea.31-open diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..3df4c5a --- /dev/null +++ b/pom.xml @@ -0,0 +1,52 @@ + + + 4.0.0 + + + org.springframework.boot + spring-boot-starter-parent + 3.1.2 + + + tk.antoine.roux + vavr-test + 1.0-SNAPSHOT + + + 21 + UTF-8 + ${java.version} + ${java.version} + + 1.0.0-alpha-4 + + + + + + io.vavr + vavr + ${vavr.version} + + + + + + + io.vavr + vavr + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-devtools + true + + + + diff --git a/src/main/java/tk/antoine/roux/Main.java b/src/main/java/tk/antoine/roux/Main.java new file mode 100644 index 0000000..60e59fd --- /dev/null +++ b/src/main/java/tk/antoine/roux/Main.java @@ -0,0 +1,12 @@ +package tk.antoine.roux; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class Main { + public static void main(String[] args) { + SpringApplication.run(Main.class, args); + } + +} diff --git a/src/main/resources/public/favicon.ico b/src/main/resources/public/favicon.ico new file mode 100644 index 0000000..39ccaff Binary files /dev/null and b/src/main/resources/public/favicon.ico differ diff --git a/src/main/resources/public/index.html b/src/main/resources/public/index.html new file mode 100644 index 0000000..90eac2f --- /dev/null +++ b/src/main/resources/public/index.html @@ -0,0 +1,18 @@ + + + backoffice + + +
+ + + + + + + + + + + + diff --git a/src/main/resources/public/src/App.js b/src/main/resources/public/src/App.js new file mode 100644 index 0000000..96f9e5a --- /dev/null +++ b/src/main/resources/public/src/App.js @@ -0,0 +1,80 @@ +'use strict'; + +// import {useState, useEffect} from 'react'; + +function formatDate(date) { + return date.toLocaleString(); +} + +function currentDate() { + return new Date(); +} + +function RootHeader() { + return ( +
+
+ ); +} + +function RootFooter() { + return ( + + ); +} + +function Result({criteria}) { + const [res, setRes] = React.useState([]); + React.useEffect(() => { + console.log("hey") + setRes([...res, "toto"]); + }, [criteria]); + return ( +
+ { + res.map((r) => +
{r}
+ ) + } +
+ ) +} + +function SearchInput() { + const [criteria, setCriteria] = React.useState("") + // searchByCriteria(criteria); + return ( + setCriteria(e.target.value)} + /> + ) +} + +function RootBody(props) { + return ( +
+
coucou 2
+ + +
{formatDate(props.date)}
+
+ ); +} + +function App() { + return ( +
+ + + +
+ ); +} + +let target = ReactDOM.createRoot(document.getElementById('react_container')); +target.render( + + + +)