diff --git a/packages/frontend/package.json b/packages/frontend/package.json
index 1672318..13acd31 100644
--- a/packages/frontend/package.json
+++ b/packages/frontend/package.json
@@ -20,6 +20,7 @@
"react-apexcharts": "^1.4.1",
"react-country-flag": "^3.1.0",
"react-dom": "^18.2.0",
+ "react-helmet-async": "^2.0.5",
"react-hot-toast": "^2.4.1",
"react-i18next": "^15.0.2",
"react-icons": "^4.10.1",
diff --git a/packages/frontend/src/App.tsx b/packages/frontend/src/App.tsx
index 5503773..009e4af 100644
--- a/packages/frontend/src/App.tsx
+++ b/packages/frontend/src/App.tsx
@@ -2,11 +2,7 @@ import { useEffect, useState } from 'react';
import { Route, Routes, useLocation } from 'react-router-dom';
import { Loader } from './components/mini/loaders/PageLoader.tsx';
-import { PageTitle } from './components/mini/util/PageTitle.tsx';
-import Chart from './old/Chart.tsx';
import { Home } from './pages/Home';
-import Alerts from './old/UiElements/Alerts.tsx';
-import Buttons from './old/UiElements/Buttons.tsx';
import DefaultLayout from './layout/DefaultLayout';
import './i18n';
import { TrainLeaderboard } from './pages/leaderboard/TrainLeaderboard.tsx';
@@ -19,6 +15,8 @@ import { Log } from './pages/log/Log.tsx';
import 'react-toastify/dist/ReactToastify.css';
import { ToastContainer } from 'react-toastify';
import useColorMode from './hooks/useColorMode.tsx';
+import { HelmetProvider } from 'react-helmet-async';
+import { PageMeta } from './components/mini/util/PageMeta.tsx';
function App() {
const [loading, setLoading] = useState(true);
@@ -32,96 +30,107 @@ function App() {
setTimeout(() => setLoading(false), 400);
}, []);
- return loading ? (
-
- ) : (
- <>
-
-
-
-
-
-
- >
- }
- />
-
-
-
- >
- }
- />
+ return
-
-
-
- >
- }
- />
-
-
-
- >
- }
- />
+ {loading ? (
+
+ ) : (
+ <>
+
+
+
+
+
+
+ >
+ }
+ />
+
+
+
+ >
+ }
+ />
-
-
-
- >
- }
- />
+
+
+
+ >
+ }
+ />
-
-
- {/* page title is modified after API response */}
-
- >
- }
- />
+
+
+
+ >
+ }
+ />
-
-
- {/* page title is modified after API response */}
-
- >
- }
- />
-
-
- >
- );
+
+
+
+ >
+ }
+ />
+
+
+
+ {/* page meta is modified in component! */}
+
+ >
+ }
+ />
+
+
+
+ {/* page title is modified after API response */}
+
+ >
+ }
+ />
+
+
+ >
+ )}
+ ;
}
export default App;
diff --git a/packages/frontend/src/components/mini/util/CardDataStats.tsx b/packages/frontend/src/components/mini/util/CardDataStats.tsx
new file mode 100644
index 0000000..7718d6d
--- /dev/null
+++ b/packages/frontend/src/components/mini/util/CardDataStats.tsx
@@ -0,0 +1,70 @@
+import React from 'react';
+
+interface CardDataStatsProps {
+ title: string;
+ total: string;
+ rate?: string;
+ levelUp?: boolean;
+ levelDown?: boolean;
+}
+
+export const CardDataStats: React.FC = ({
+ title,
+ total,
+ rate,
+ levelUp,
+ levelDown
+ }) => {
+ return (
+
+
+
+
+
+ {total}
+
+ {title}
+
+
+ {rate &&
+ {rate}
+
+ {levelUp && (
+
+ )}
+ {levelDown && (
+
+ )}
+ }
+
+
+ );
+};
\ No newline at end of file
diff --git a/packages/frontend/src/components/mini/util/PageMeta.tsx b/packages/frontend/src/components/mini/util/PageMeta.tsx
new file mode 100644
index 0000000..9601c9d
--- /dev/null
+++ b/packages/frontend/src/components/mini/util/PageMeta.tsx
@@ -0,0 +1,29 @@
+import { Helmet } from 'react-helmet-async';
+
+// https://dev.to/facubotta/meta-data-in-react-1p93
+export const PageMeta = ({ title = '', description = '', image = '', name = '' }) => {
+ return (
+
+ { /* Standard metadata tags */}
+ {title}
+
+
+ { /* Open Graph tags (OG) */}
+
+
+
+
+ {/* OG image tags */}
+
+
+
+
+
+ { /* Twitter tags */}
+ {name && }
+
+
+
+
+ );
+};
\ No newline at end of file
diff --git a/packages/frontend/src/components/mini/util/PageTitle.tsx b/packages/frontend/src/components/mini/util/PageTitle.tsx
deleted file mode 100644
index 2e5ccac..0000000
--- a/packages/frontend/src/components/mini/util/PageTitle.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-import React, { useEffect } from 'react';
-import { useLocation } from 'react-router-dom';
-
-interface PageTitleProps {
- title: string;
-}
-
-export const PageTitle: React.FC = ({ title }) => {
- const location = useLocation();
-
- useEffect(() => {
- document.title = title;
- }, [location, title]);
-
- return null; // This component doesn't render anything
-};
diff --git a/packages/frontend/src/components/pages/profile/Profile.tsx b/packages/frontend/src/components/pages/profile/Profile.tsx
index 30798dd..6ce7a80 100644
--- a/packages/frontend/src/components/pages/profile/Profile.tsx
+++ b/packages/frontend/src/components/pages/profile/Profile.tsx
@@ -95,7 +95,7 @@ export const ProfileCard = ({ data }: { data: TProfileData }) => {
{train.score}
-
+
{Math.floor(train.time / 3600000)}h
;
diff --git a/packages/frontend/src/i18n/languages/en.json b/packages/frontend/src/i18n/languages/en.json
index 78e2150..09f46a1 100644
--- a/packages/frontend/src/i18n/languages/en.json
+++ b/packages/frontend/src/i18n/languages/en.json
@@ -13,7 +13,7 @@
"profiles": "Profiles"
},
"title": "Simrail Stats",
- "description": "The most complete SimRail logs and statistics site!",
+ "description": "Simrail Stats - The best SimRail logs and statistics site!",
"buttons": {
"project": "Project page",
"forum": "Forum Page"
diff --git a/packages/frontend/src/old/CardDataStats.tsx b/packages/frontend/src/old/CardDataStats.tsx
deleted file mode 100644
index ef7afae..0000000
--- a/packages/frontend/src/old/CardDataStats.tsx
+++ /dev/null
@@ -1,76 +0,0 @@
-import React from "react";
-
-interface CardDataStatsProps
-{
- title: string;
- total: string;
- rate?: string;
- levelUp?: boolean;
- levelDown?: boolean;
-}
-
-const CardDataStats: React.FC = ({
- title,
- total,
- rate,
- levelUp,
- levelDown,
- }) =>
-{
- return (
-
-
-
-
- { total }
-
- { title }
-
-
- { rate && <>
-
- { rate }
-
- { levelUp && (
-
- ) }
- { levelDown && (
-
- ) }
-
- > }
-
-
- );
-};
-
-export default CardDataStats;
diff --git a/packages/frontend/src/old/Chart.tsx b/packages/frontend/src/old/Chart.tsx
deleted file mode 100644
index 9843f6d..0000000
--- a/packages/frontend/src/old/Chart.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-import React from "react";
-
-import ChartOne from "./Charts/ChartOne";
-import ChartThree from "./Charts/ChartThree";
-import ChartTwo from "./Charts/ChartTwo";
-
-const Chart: React.FC = () =>
-{
- return (
- <>
-
-
-
-
-
- >
- );
-};
-
-export default Chart;
diff --git a/packages/frontend/src/old/Charts/ChartOne.tsx b/packages/frontend/src/old/Charts/ChartOne.tsx
deleted file mode 100644
index 60ebccf..0000000
--- a/packages/frontend/src/old/Charts/ChartOne.tsx
+++ /dev/null
@@ -1,208 +0,0 @@
-import { ApexOptions } from "apexcharts";
-import React, { useState } from "react";
-import ReactApexChart from "react-apexcharts";
-
-const options: ApexOptions = {
- legend: {
- show: false,
- position: "top",
- horizontalAlign: "left",
- },
- colors: [ "#3C50E0", "#80CAEE" ],
- chart: {
- fontFamily: "Satoshi, sans-serif",
- height: 335,
- type: "area",
- dropShadow: {
- enabled: true,
- color: "#623CEA14",
- top: 10,
- blur: 4,
- left: 0,
- opacity: 0.1,
- },
-
- toolbar: {
- show: false,
- },
- },
- responsive: [
- {
- breakpoint: 1024,
- options: {
- chart: {
- height: 300,
- },
- },
- },
- {
- breakpoint: 1366,
- options: {
- chart: {
- height: 350,
- },
- },
- },
- ],
- stroke: {
- width: [ 2, 2 ],
- curve: "straight",
- },
- // labels: {
- // show: false,
- // position: "top",
- // },
- grid: {
- xaxis: {
- lines: {
- show: true,
- },
- },
- yaxis: {
- lines: {
- show: true,
- },
- },
- },
- dataLabels: {
- enabled: false,
- },
- markers: {
- size: 4,
- colors: "#fff",
- strokeColors: [ "#3056D3", "#80CAEE" ],
- strokeWidth: 3,
- strokeOpacity: 0.9,
- strokeDashArray: 0,
- fillOpacity: 1,
- discrete: [],
- hover: {
- size: undefined,
- sizeOffset: 5,
- },
- },
- xaxis: {
- type: "category",
- categories: [
- "Sep",
- "Oct",
- "Nov",
- "Dec",
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- ],
- axisBorder: {
- show: false,
- },
- axisTicks: {
- show: false,
- },
- },
- yaxis: {
- title: {
- style: {
- fontSize: "0px",
- },
- },
- min: 0,
- max: 100,
- },
-};
-
-interface ChartOneState
-{
- series: {
- name: string;
- data: number[];
- }[];
-}
-
-const ChartOne: React.FC = () =>
-{
- const [ state, setState ] = useState({
- series: [
- {
- name: "Product One",
- data: [ 23, 11, 22, 27, 13, 22, 37, 21, 44, 22, 30, 45 ],
- },
-
- {
- name: "Product Two",
- data: [ 30, 25, 36, 30, 45, 35, 64, 52, 59, 36, 39, 51 ],
- },
- ],
- });
-
- const handleReset = () =>
- {
- setState((prevState) => ({
- ...prevState,
- }));
- };
- handleReset;
-
- return (
-
-
-
-
-
-
-
-
-
Total Revenue
-
12.04.2022 - 12.05.2022
-
-
-
-
-
-
-
-
Total Sales
-
12.04.2022 - 12.05.2022
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
-};
-
-export default ChartOne;
diff --git a/packages/frontend/src/old/Charts/ChartThree.tsx b/packages/frontend/src/old/Charts/ChartThree.tsx
deleted file mode 100644
index c7a3584..0000000
--- a/packages/frontend/src/old/Charts/ChartThree.tsx
+++ /dev/null
@@ -1,167 +0,0 @@
-import { ApexOptions } from "apexcharts";
-import React, { useState } from "react";
-import ReactApexChart from "react-apexcharts";
-
-interface ChartThreeState
-{
- series: number[];
-}
-
-const options: ApexOptions = {
- chart: {
- fontFamily: "Satoshi, sans-serif",
- type: "donut",
- },
- colors: [ "#3C50E0", "#6577F3", "#8FD0EF", "#0FADCF" ],
- labels: [ "Desktop", "Tablet", "Mobile", "Unknown" ],
- legend: {
- show: false,
- position: "bottom",
- },
-
- plotOptions: {
- pie: {
- donut: {
- size: "65%",
- background: "transparent",
- },
- },
- },
- dataLabels: {
- enabled: false,
- },
- responsive: [
- {
- breakpoint: 2600,
- options: {
- chart: {
- width: 380,
- },
- },
- },
- {
- breakpoint: 640,
- options: {
- chart: {
- width: 200,
- },
- },
- },
- ],
-};
-
-const ChartThree: React.FC = () =>
-{
- const [ state, setState ] = useState({
- series: [ 65, 34, 12, 56 ],
- });
-
- const handleReset = () =>
- {
- setState((prevState) => ({
- ...prevState,
- series: [ 65, 34, 12, 56 ],
- }));
- };
- handleReset;
-
- return (
-
-
-
-
- Visitors Analytics
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
-};
-
-export default ChartThree;
diff --git a/packages/frontend/src/old/Charts/ChartTwo.tsx b/packages/frontend/src/old/Charts/ChartTwo.tsx
deleted file mode 100644
index 5f3f0e4..0000000
--- a/packages/frontend/src/old/Charts/ChartTwo.tsx
+++ /dev/null
@@ -1,153 +0,0 @@
-import { ApexOptions } from "apexcharts";
-import React, { useState } from "react";
-import ReactApexChart from "react-apexcharts";
-
-const options: ApexOptions = {
- colors: [ "#3C50E0", "#80CAEE" ],
- chart: {
- fontFamily: "Satoshi, sans-serif",
- type: "bar",
- height: 335,
- stacked: true,
- toolbar: {
- show: false,
- },
- zoom: {
- enabled: false,
- },
- },
-
- responsive: [
- {
- breakpoint: 1536,
- options: {
- plotOptions: {
- bar: {
- borderRadius: 0,
- columnWidth: "25%",
- },
- },
- },
- },
- ],
- plotOptions: {
- bar: {
- horizontal: false,
- borderRadius: 0,
- columnWidth: "25%",
- borderRadiusApplication: "end",
- borderRadiusWhenStacked: "last",
- },
- },
- dataLabels: {
- enabled: false,
- },
-
- xaxis: {
- categories: [ "M", "T", "W", "T", "F", "S", "S" ],
- },
- legend: {
- position: "top",
- horizontalAlign: "left",
- fontFamily: "Satoshi",
- fontWeight: 500,
- fontSize: "14px",
-
- markers: {
- radius: 99,
- },
- },
- fill: {
- opacity: 1,
- },
-};
-
-interface ChartTwoState
-{
- series: {
- name: string;
- data: number[];
- }[];
-}
-
-const ChartTwo: React.FC = () =>
-{
- const [ state, setState ] = useState({
- series: [
- {
- name: "Sales",
- data: [ 44, 55, 41, 67, 22, 43, 65 ],
- },
- {
- name: "Revenue",
- data: [ 13, 23, 20, 8, 13, 27, 15 ],
- },
- ],
- });
-
- const handleReset = () =>
- {
- setState((prevState) => ({
- ...prevState,
- }));
- };
- handleReset;
-
- return (
-
-
-
-
- Profit this week
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
-};
-
-export default ChartTwo;
diff --git a/packages/frontend/src/old/Chat/ChatCard.tsx b/packages/frontend/src/old/Chat/ChatCard.tsx
deleted file mode 100644
index cd63993..0000000
--- a/packages/frontend/src/old/Chat/ChatCard.tsx
+++ /dev/null
@@ -1,112 +0,0 @@
-import { Link } from "react-router-dom";
-import { Chat } from "../../old/chat";
-import UserOne from "../../images/user/user-01.png";
-import UserTwo from "../../images/user/user-02.png";
-import UserThree from "../../images/user/user-03.png";
-import UserFour from "../../images/user/user-04.png";
-import UserFive from "../../images/user/user-05.png";
-
-const chatData: Chat[] = [
- {
- avatar: UserOne,
- name: "Devid Heilo",
- text: "How are you?",
- time: 12,
- textCount: 3,
- color: "#10B981",
- },
- {
- avatar: UserTwo,
- name: "Henry Fisher",
- text: "Waiting for you!",
- time: 12,
- textCount: 0,
- color: "#DC3545",
- },
- {
- avatar: UserFour,
- name: "Jhon Doe",
- text: "What's up?",
- time: 32,
- textCount: 0,
- color: "#10B981",
- },
- {
- avatar: UserFive,
- name: "Jane Doe",
- text: "Great",
- time: 32,
- textCount: 2,
- color: "#FFBA00",
- },
- {
- avatar: UserOne,
- name: "Jhon Doe",
- text: "How are you?",
- time: 32,
- textCount: 0,
- color: "#10B981",
- },
- {
- avatar: UserThree,
- name: "Jhon Doe",
- text: "How are you?",
- time: 32,
- textCount: 3,
- color: "#FFBA00",
- },
-];
-
-const ChatCard = () =>
-{
- return (
-
-
- Chats
-
-
-
- { chatData.map((chat, key) => (
-
-
-

-
-
-
-
-
-
- { chat.name }
-
-
-
- { chat.text }
-
- . { chat.time } min
-
-
- { chat.textCount !== 0 && (
-
-
- { " " }
- { chat.textCount }
-
-
- ) }
-
-
- )) }
-
-
- );
-};
-
-export default ChatCard;
diff --git a/packages/frontend/src/old/Checkboxes/CheckboxFive.tsx b/packages/frontend/src/old/Checkboxes/CheckboxFive.tsx
deleted file mode 100644
index fd4ff9f..0000000
--- a/packages/frontend/src/old/Checkboxes/CheckboxFive.tsx
+++ /dev/null
@@ -1,37 +0,0 @@
-import { useState } from "react";
-
-const CheckboxFive = () =>
-{
- const [ isChecked, setIsChecked ] = useState(false);
-
- return (
-
-
-
- );
-};
-
-export default CheckboxFive;
diff --git a/packages/frontend/src/old/Checkboxes/CheckboxFour.tsx b/packages/frontend/src/old/Checkboxes/CheckboxFour.tsx
deleted file mode 100644
index c1cfb80..0000000
--- a/packages/frontend/src/old/Checkboxes/CheckboxFour.tsx
+++ /dev/null
@@ -1,43 +0,0 @@
-import { useState } from "react";
-
-const CheckboxFour = () =>
-{
- const [ isChecked, setIsChecked ] = useState(false);
-
- return (
-
-
-
- );
-};
-
-export default CheckboxFour;
diff --git a/packages/frontend/src/old/Checkboxes/CheckboxOne.tsx b/packages/frontend/src/old/Checkboxes/CheckboxOne.tsx
deleted file mode 100644
index a018c83..0000000
--- a/packages/frontend/src/old/Checkboxes/CheckboxOne.tsx
+++ /dev/null
@@ -1,39 +0,0 @@
-import { useState } from "react";
-
-const CheckboxOne = () =>
-{
- const [ isChecked, setIsChecked ] = useState(false);
-
- return (
-
-
-
- );
-};
-
-export default CheckboxOne;
diff --git a/packages/frontend/src/old/Checkboxes/CheckboxThree.tsx b/packages/frontend/src/old/Checkboxes/CheckboxThree.tsx
deleted file mode 100644
index ba6a953..0000000
--- a/packages/frontend/src/old/Checkboxes/CheckboxThree.tsx
+++ /dev/null
@@ -1,55 +0,0 @@
-import { useState } from "react";
-
-const CheckboxThree = () =>
-{
- const [ isChecked, setIsChecked ] = useState(false);
-
- return (
-
-
-
- );
-};
-
-export default CheckboxThree;
diff --git a/packages/frontend/src/old/Checkboxes/CheckboxTwo.tsx b/packages/frontend/src/old/Checkboxes/CheckboxTwo.tsx
deleted file mode 100644
index e081dae..0000000
--- a/packages/frontend/src/old/Checkboxes/CheckboxTwo.tsx
+++ /dev/null
@@ -1,52 +0,0 @@
-import { useState } from "react";
-
-const CheckboxTwo = () =>
-{
- const [ isChecked, setIsChecked ] = useState(false);
-
- return (
-
-
-
- );
-};
-
-export default CheckboxTwo;
diff --git a/packages/frontend/src/old/ClickOutside.tsx b/packages/frontend/src/old/ClickOutside.tsx
deleted file mode 100644
index fb74718..0000000
--- a/packages/frontend/src/old/ClickOutside.tsx
+++ /dev/null
@@ -1,62 +0,0 @@
-import React, { useRef, useEffect } from "react";
-
-interface Props
-{
- children: React.ReactNode;
- exceptionRef?: React.RefObject;
- onClick: () => void;
- className?: string;
-}
-
-const ClickOutside: React.FC = ({
- children,
- exceptionRef,
- onClick,
- className,
- }) =>
-{
- const wrapperRef = useRef(null);
-
- useEffect(() =>
- {
- const handleClickListener = (event: MouseEvent) =>
- {
- let clickedInside: null | boolean = false;
- if (exceptionRef)
- {
- clickedInside =
- (wrapperRef.current &&
- wrapperRef.current.contains(event.target as Node)) ||
- (exceptionRef.current && exceptionRef.current === event.target) ||
- (exceptionRef.current &&
- exceptionRef.current.contains(event.target as Node));
- }
- else
- {
- clickedInside =
- wrapperRef.current &&
- wrapperRef.current.contains(event.target as Node);
- }
-
- if (!clickedInside)
- {
- onClick();
- }
- };
-
- document.addEventListener("mousedown", handleClickListener);
-
- return () =>
- {
- document.removeEventListener("mousedown", handleClickListener);
- };
- }, [ exceptionRef, onClick ]);
-
- return (
-
- { children }
-
- );
-};
-
-export default ClickOutside;
diff --git a/packages/frontend/src/old/Dropdowns/DropdownDefault.tsx b/packages/frontend/src/old/Dropdowns/DropdownDefault.tsx
deleted file mode 100644
index f72e419..0000000
--- a/packages/frontend/src/old/Dropdowns/DropdownDefault.tsx
+++ /dev/null
@@ -1,143 +0,0 @@
-import { useEffect, useRef, useState } from "react";
-
-const DropdownDefault = () =>
-{
- const [ dropdownOpen, setDropdownOpen ] = useState(false);
-
- const trigger = useRef(null);
- const dropdown = useRef(null);
-
- // close on click outside
- useEffect(() =>
- {
- const clickHandler = ({ target }: MouseEvent) =>
- {
- if (!dropdown.current)
- {
- return;
- }
- if (
- !dropdownOpen ||
- dropdown.current.contains(target) ||
- trigger.current.contains(target)
- )
- {
- return;
- }
- setDropdownOpen(false);
- };
- document.addEventListener("click", clickHandler);
- return () => document.removeEventListener("click", clickHandler);
- });
-
- // close if the esc key is pressed
- useEffect(() =>
- {
- const keyHandler = ({ keyCode }: KeyboardEvent) =>
- {
- if (!dropdownOpen || keyCode !== 27)
- {
- return;
- }
- setDropdownOpen(false);
- };
- document.addEventListener("keydown", keyHandler);
- return () => document.removeEventListener("keydown", keyHandler);
- });
-
- return (
-
-
-
setDropdownOpen(true) }
- onBlur={ () => setDropdownOpen(false) }
- className={ `absolute right-0 top-full z-40 w-40 space-y-1 rounded-sm border border-stroke bg-white p-1.5 shadow-default dark:border-strokedark dark:bg-boxdark ${
- dropdownOpen === true ? "block" : "hidden"
- }` }
- >
-
-
-
-
- );
-};
-
-export default DropdownDefault;
diff --git a/packages/frontend/src/old/Forms/DatePicker/DatePickerOne.tsx b/packages/frontend/src/old/Forms/DatePicker/DatePickerOne.tsx
deleted file mode 100644
index c6ef856..0000000
--- a/packages/frontend/src/old/Forms/DatePicker/DatePickerOne.tsx
+++ /dev/null
@@ -1,54 +0,0 @@
-import flatpickr from "flatpickr";
-import { useEffect } from "react";
-
-const DatePickerOne = () =>
-{
- useEffect(() =>
- {
- // Init flatpickr
- flatpickr(".form-datepicker", {
- mode: "single",
- static: true,
- monthSelectorType: "static",
- dateFormat: "M j, Y",
- prevArrow:
- "",
- nextArrow:
- "",
- });
-
-
- }, []);
-
- return (
-
- );
-};
-
-export default DatePickerOne;
diff --git a/packages/frontend/src/old/Forms/DatePicker/DatePickerTwo.tsx b/packages/frontend/src/old/Forms/DatePicker/DatePickerTwo.tsx
deleted file mode 100644
index b6c34f6..0000000
--- a/packages/frontend/src/old/Forms/DatePicker/DatePickerTwo.tsx
+++ /dev/null
@@ -1,54 +0,0 @@
-import flatpickr from "flatpickr";
-import { useEffect } from "react";
-
-const DatePickerTwo = () =>
-{
- useEffect(() =>
- {
- // Init flatpickr
- flatpickr(".form-datepicker", {
- mode: "single",
- static: true,
- monthSelectorType: "static",
- dateFormat: "M j, Y",
- prevArrow:
- "",
- nextArrow:
- "",
- });
-
-
- }, []);
-
- return (
-
- );
-};
-
-export default DatePickerTwo;
diff --git a/packages/frontend/src/old/Forms/MultiSelect.tsx b/packages/frontend/src/old/Forms/MultiSelect.tsx
deleted file mode 100644
index 33d6a1b..0000000
--- a/packages/frontend/src/old/Forms/MultiSelect.tsx
+++ /dev/null
@@ -1,251 +0,0 @@
-import React, { useState, useEffect, useRef } from "react";
-
-interface Option
-{
- value: string;
- text: string;
- selected: boolean;
- element?: HTMLElement;
-}
-
-interface DropdownProps
-{
- id: string;
-}
-
-const MultiSelect: React.FC = ({ id }) =>
-{
- const [ options, setOptions ] = useState
-
-
-
-
-
-
- <% }) %>
-
-
- <% if (!records.length) { %>
- Nie znaleziono wyników dla twojego zapytania.
- <% } %>
-
-
- <%- include('../_modules/footer.ejs', { thanks: false, version, commit }) %>
-
-
-
-
-
-
\ No newline at end of file
diff --git a/yarn.lock b/yarn.lock
index 545c040..05fd991 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1722,6 +1722,13 @@ inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@~2.0.1, inherits@~2.0.3:
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
+invariant@^2.2.4:
+ version "2.2.4"
+ resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
+ integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==
+ dependencies:
+ loose-envify "^1.0.0"
+
ipaddr.js@1.9.1:
version "1.9.1"
resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3"
@@ -1875,7 +1882,7 @@ lodash@^4.17.21:
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
-loose-envify@^1.1.0, loose-envify@^1.4.0:
+loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
@@ -2318,6 +2325,20 @@ react-dom@^18.2.0:
loose-envify "^1.1.0"
scheduler "^0.23.2"
+react-fast-compare@^3.2.2:
+ version "3.2.2"
+ resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.2.2.tgz#929a97a532304ce9fee4bcae44234f1ce2c21d49"
+ integrity sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==
+
+react-helmet-async@^2.0.5:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/react-helmet-async/-/react-helmet-async-2.0.5.tgz#cfc70cd7bb32df7883a8ed55502a1513747223ec"
+ integrity sha512-rYUYHeus+i27MvFE+Jaa4WsyBKGkL6qVgbJvSBoX8mbsWoABJXdEO0bZyi0F6i+4f0NuIb8AvqPMj3iXFHkMwg==
+ dependencies:
+ invariant "^2.2.4"
+ react-fast-compare "^3.2.2"
+ shallowequal "^1.1.0"
+
react-hot-toast@^2.4.1:
version "2.4.1"
resolved "https://registry.yarnpkg.com/react-hot-toast/-/react-hot-toast-2.4.1.tgz#df04295eda8a7b12c4f968e54a61c8d36f4c0994"
@@ -2565,6 +2586,11 @@ setprototypeof@1.2.0:
resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424"
integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==
+shallowequal@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8"
+ integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==
+
shebang-command@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"