Compare commits

...

10 Commits

Author SHA1 Message Date
738ffd1cee removing unecessary console.logs
All checks were successful
continuous-integration/drone/push Build is passing
2024-09-30 16:13:57 +02:00
63935f62fe removing unecessary console.logs 2024-09-30 16:13:50 +02:00
7dc67a5f0f removing unecessary console.logs 2024-09-30 16:13:45 +02:00
d1b00ae232 fixing backeground picture missing last pixels 2024-09-30 16:13:33 +02:00
7051ba7aed fixing passing unstringed boolean in aunclosable attributes 2024-09-30 16:13:06 +02:00
0528ca7ef2 fixing js problem with package update 2024-09-30 16:12:30 +02:00
72deba14a5 reducing margin on home 2024-09-30 16:12:09 +02:00
f46446eab5 removing unused backend index js file 2024-09-30 16:11:58 +02:00
fc43f1c2d5 fixing nav problem with package update 2024-09-30 16:11:35 +02:00
a18ed37276 updating package 2024-09-30 16:11:12 +02:00
12 changed files with 898 additions and 800 deletions

View File

@ -1,50 +0,0 @@
const PORT = 8000;
const express = require("express");
const cors = require("cors");
const axios = require("axios");
require("dotenv").config();
const app = express();
app.use(cors());
app.use(express.json());
app.get("/", cors(), async (req, res) => {
res.json("nothing here");
});
app.post("/post-statistics", cors(), async (req, res) => {
const WORDPRESS_STATS_USERNAME = process.env.REACT_APP_WORDPRESS_STATS_USERNAME;
const WORDPRESS_STATS_PASSWORD = process.env.REACT_APP_WORDPRESS_STATS_PASSWORD;
const WORDPRESS_GET_TOKEN_URL = process.env.REACT_APP_WORDPRESS_GET_TOKEN_URL;
const WORDPRESS_POST_STATS_URL = process.env.REACT_APP_WORDPRESS_POST_STATS_URL;
try {
// ##### GET TOKEN
const tokenResponse = await axios.post(WORDPRESS_GET_TOKEN_URL, {
username: WORDPRESS_STATS_USERNAME,
password: WORDPRESS_STATS_PASSWORD,
});
const token = tokenResponse.data.token;
const requestDataExample = req.body;
const secondResponse = await axios({
method: "POST",
url: WORDPRESS_POST_STATS_URL,
headers: { Authorization: `Bearer ${token}` },
data: requestDataExample,
});
// ##### RETURN SUCCESS
res.json(secondResponse.data);
} catch (error) {
console.error(error);
res.status(500).send("An error occurred");
}
});
app.listen(PORT, () => {
console.log(`Backend is running on port ${PORT}`);
});

65
old_package copy.json Normal file
View File

@ -0,0 +1,65 @@
{
"name": "stay-safe",
"version": "0.1.0",
"private": true,
"dependencies": {
"@parcellab/react-use-umami": "^2.0.1",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"@umami/api-client": "^0.56.0",
"axios": "^1.6.7",
"cors": "^2.8.5",
"dotenv": "^16.4.5",
"express": "^4.18.2",
"framer-motion": "^11.0.3",
"lottie-react": "^2.4.0",
"nodemon": "^3.0.3",
"postcss": "^8.4.33",
"postcss-cli": "^11.0.0",
"postcss-nested": "^6.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-error-boundary": "^4.0.13",
"react-router-dom": "^6.21.3",
"react-scripts": "5.0.1",
"react-umami": "^1.0.1",
"react-zoom-pan-pinch": "^3.4.2",
"sass": "^1.70.0",
"swiper": "^11.0.7",
"use-sound": "^4.0.1",
"uuid": "^9.0.1",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"start:backend": "nodemon index.js",
"start:front-end": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"concurrently": "^8.2.2",
"tailwindcss": "^3.4.1"
}
}

1556
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,6 @@
"express": "^4.18.2", "express": "^4.18.2",
"framer-motion": "^11.0.3", "framer-motion": "^11.0.3",
"lottie-react": "^2.4.0", "lottie-react": "^2.4.0",
"nodemon": "^3.0.3",
"postcss": "^8.4.33", "postcss": "^8.4.33",
"postcss-cli": "^11.0.0", "postcss-cli": "^11.0.0",
"postcss-nested": "^6.0.1", "postcss-nested": "^6.0.1",

View File

@ -16,7 +16,7 @@ nav.main-menu {
@apply overflow-y-auto; @apply overflow-y-auto;
} }
.menu { .menu {
@apply bg-lhoist pl-6 w-full h-screen fixed bottom-0 left-0 flex flex-col justify-between; @apply bg-lhoist pl-6 w-full h-screen fixed top-0 bottom-0 left-0 flex flex-col justify-between;
height: 100dvh; height: 100dvh;
box-sizing: border-box; box-sizing: border-box;
// &[open] { // &[open] {

View File

@ -31,10 +31,11 @@
:active { :active {
@apply cursor--grab; @apply cursor--grab;
} }
@apply w-screen overflow-x-scroll left-0 top-0 absolute h-full; @apply w-full overflow-x-scroll left-0 top-0 absolute h-full;
&__background_picture { &__background_picture {
@apply top-0 h-full w-auto block; @apply top-0 h-full block;
@apply w-auto;
height: 100%; height: 100%;
max-width: revert; max-width: revert;

View File

@ -35,7 +35,7 @@ $margin: 20px;
} }
} }
&__content { &__content {
@apply mt-36; @apply mt-28;
@media screen and (min-height: 926px) { @media screen and (min-height: 926px) {
@apply mt-0; @apply mt-0;
@ -68,7 +68,7 @@ $margin: 20px;
margin-bottom: -40px; margin-bottom: -40px;
} }
.cta--play { .cta--play {
@apply mx-auto; @apply mx-auto z-50;
transform: translateY(50%); transform: translateY(50%);
} }
} }

View File

@ -12,7 +12,9 @@ import { useUser } from "../../hooks/useUser.jsx";
export default function ResultsModals({ resultsDatas }) { export default function ResultsModals({ resultsDatas }) {
useEffect(() => { useEffect(() => {
document.querySelector("dialog").scrollTo(0, 0); const dialog = document.querySelector("dialog");
if (!dialog) return;
dialog.scrollTo(0, 0);
}, []); }, []);
const navigate = useNavigate(); const navigate = useNavigate();

View File

@ -29,7 +29,7 @@ export default function Modal({ open, onClose, children, className, id, closeMod
className={className} className={className}
ref={modalRef} ref={modalRef}
onClose={onClose} onClose={onClose}
unclosable={unclosable ?? "false"}> unclosable={unclosable ? "true" : "false"}>
{children} {children}
</dialog> </dialog>
); );

View File

@ -19,10 +19,6 @@ export default function CountrySelect({ options }) {
changeProfile("subcontractor_employee"); changeProfile("subcontractor_employee");
} }
console.log(screenTranslations);
// console.log(options);
return ( return (
<div className='profile-select'> <div className='profile-select'>
<ul className='' aria-hidden={!isSubmenuOpen}> <ul className='' aria-hidden={!isSubmenuOpen}>

View File

@ -21,7 +21,6 @@ export function UserContextProvider({ children }) {
const [profile, setProfile] = useState(localProfile); const [profile, setProfile] = useState(localProfile);
const [screensTranslations, setScreensTranslations] = useState({}); const [screensTranslations, setScreensTranslations] = useState({});
console.log("country", country);
useEffect(() => { useEffect(() => {
if (!language) return; if (!language) return;
const loadTranslations = async (language) => { const loadTranslations = async (language) => {

View File

@ -49,9 +49,7 @@ const postGameStatisticsData = async (requestDatas) => {
}; };
axios.request(options) axios.request(options)
.then((response) => { .then((response) => {})
console.log(response.data);
})
.catch((error) => { .catch((error) => {
console.error(error); console.error(error);
}); });