Compare commits

...

7 Commits

Author SHA1 Message Date
victorAnumudu 64390441a1 cookies fixed 2025-06-29 12:43:42 +01:00
ameye c8095755b5 Merge branch 'footer-update' of WrenchBoard/WrenchBoardMainSite2025 into master 2025-06-28 13:28:17 +00:00
victorAnumudu e1000ce0db updated footer section 2025-06-27 20:10:41 +01:00
victorAnumudu c5d67ad79b social links navigates to new tab on clink 2025-03-31 17:53:02 +01:00
victorAnumudu 80d0f0b326 updated endpoint url in prod env 2025-03-20 19:10:50 +01:00
victorAnumudu ebba068098 chat script commented 2025-03-20 19:00:44 +01:00
ameye 8ad3e31f60 Merge branch 'myrefer-link-fix' of WrenchBoard/WrenchBoardMainSite2025 into master 2024-12-03 21:35:15 +00:00
5 changed files with 62 additions and 35 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
APP_PORT=9081
ESLINT_NO_DEV_ERRORS=true
NEXT_PUBLIC_AUX_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/en/wrench/api/v1"
NEXT_PUBLIC_USERS_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/en/wrench/api/v1"
NEXT_PUBLIC_AUX_ENDPOINT="https://apigate.nebula.g1.wrenchboard.com/en/wrench/api/v1"
NEXT_PUBLIC_USERS_ENDPOINT="https://apigate.nebula.g1.wrenchboard.com/en/wrench/api/v1"
NEXT_PUBLIC_SITE_NAME='WrenchBoard'
NEXT_PUBLIC_DASH_URL='https://users.wrenchboard.com'
+30 -22
View File
@@ -1,36 +1,44 @@
"use client"
import React, { useEffect, useState } from 'react'
//import Cookies from 'js-cookie'
"use client";
import React, { useLayoutEffect, useState } from 'react';
export default function AcceptCookies() {
const [cookies, setCookies] = useState(true)
const acceptCookies = () => {
// Cookies.set('useCookies', 'true')
setCookies(true)
}
// Safe cookie getter
function getCookie(name) {
if (typeof document === 'undefined') return null; // SSR safety
const value = `; ${document.cookie}`;
const parts = value.split(`; ${name}=`);
if (parts.length === 2) return parts.pop().split(';').shift();
return null;
}
useEffect(()=>{
const useCookies = false; // Cookies.get('useCookies')
if(useCookies == 'true'){
setCookies(true)
const [cookies, setCookies] = useState(true); // Start as true
const acceptCookies = () => {
document.cookie = `use_cookies=${encodeURIComponent('true')}; path=/; max-age=31536000`; // 1 year
setCookies(true);
};
useLayoutEffect(()=>{
const useCookies = getCookie('use_cookies');
if (useCookies && decodeURIComponent(useCookies) === 'true') {
setCookies(true);
}else{
setCookies(false)
}
},[])
},[])
return (
<>
{/* {cookies ?
<></>
: */}
{cookies ? <></> : (
<div className={`${cookies ? 'slide-down' : 'slide-up'} cookies-wrapper position-fixed d-lg-flex justify-content-center align-items-center gap-5 p-2`}>
<p className='m-0'>
<p className="m-0">
This website uses cookies to provide you the best experience possible, as well as for tracking performance and marketing purposes. You can check our privacy policy for more information. By clicking &#x275B;&#x275B;Confirm&#x275C;&#x275C; or by continuing to use our website, you consent to our use of cookies.
</p>
<button onClick={acceptCookies} className='px-5 py-2'>Accept</button>
</p>
<button onClick={acceptCookies} className="px-5 py-2">
Accept
</button>
</div>
{/* } */}
)}
</>
)
);
}
+28 -8
View File
@@ -31,26 +31,25 @@ function FooterHomeOne({ className }) {
<Link href="/service">
Read More <i className="fal fa-arrow-right" />
</Link>
<div className="social mt-30">
{/* <div className="social mt-30">
<ul>
<li>
<a href={site.facebook_link}>
<a target='_blank' href={site.facebook_link}>
<i className="fab fa-facebook-f"/>
</a>
</li>
<li>
<a href={process.env.NEXT_PUBLIC_TWITTER_LINK}>
{/* <i className="fab fa-twitter" /> */}
<a target='_blank' href={process.env.NEXT_PUBLIC_TWITTER_LINK}>
<i className="fab fa-x-twitter"></i>
</a>
</li>
<li>
<a className="you" href={process.env.NEXT_PUBLIC_YOUTUBE_LINK}>
<a target='_blank' className="you" href={process.env.NEXT_PUBLIC_YOUTUBE_LINK}>
<i className="fab fa-youtube"></i>
</a>
</li>
</ul>
</div>
</div> */}
</div>
</div>
<div className="col-lg-2 col-md-6">
@@ -107,7 +106,7 @@ function FooterHomeOne({ className }) {
<i className="fal fa-envelope" /> {site.support_email}
</a>
</li>
<li>
{/* <li>
<a href="#">
<i className="fal fa-phone" /> 404-855-7966
</a>
@@ -116,9 +115,30 @@ function FooterHomeOne({ className }) {
<a href="#">
<i className="fal fa-map-marker-alt" />Atlanta, GA 30339
</a>
</li>
</li> */}
</ul>
</div>
<div className='footer-about-widget'>
<div className="social mt-30">
<ul>
<li>
<a target='_blank' href={site.facebook_link}>
<i className="fab fa-facebook-f"/>
</a>
</li>
<li>
<a target='_blank' href={process.env.NEXT_PUBLIC_TWITTER_LINK}>
<i className="fab fa-x-twitter"></i>
</a>
</li>
<li>
<a target='_blank' className="you" href={process.env.NEXT_PUBLIC_YOUTUBE_LINK}>
<i className="fab fa-youtube"></i>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div className="row">
+2 -2
View File
@@ -36,7 +36,7 @@ export default function RootLayout({
{children}
<AcceptCookies />
</body>
<Script id='chat-support'>
{/* <Script id='chat-support'>
{`
var LHC_API = LHC_API || {};
LHC_API.args = {
@@ -62,7 +62,7 @@ export default function RootLayout({
s.parentNode.insertBefore(po, s);
})();
`}
</Script>
</Script> */}
</html>
);
}
-1
View File
@@ -11,7 +11,6 @@
"dependencies": {
"axios": "^1.7.2",
"caniuse-lite": "^1.0.30001651",
"js-cookie": "^3.0.5",
"next": "14.2.5",
"react": "^18",
"react-dom": "^18",