Initial Vite Configuration & addition of prettierrc.
This commit is contained in:
@@ -9,8 +9,8 @@ export default function AboutPage() {
|
||||
imex: "ImEX Online",
|
||||
rome: "Rome Online",
|
||||
promanager: "ProManager",
|
||||
})}Rome Online V.${process.env.NODE_ENV}-${
|
||||
process.env.REACT_APP_GIT_SHA
|
||||
})}Rome Online V.${import.meta.env.MODE}-${
|
||||
import.meta.env.VITE_APP_GIT_SHA
|
||||
}`}</Typography.Title>
|
||||
<Typography.Title level={2}>Third Party Notices</Typography.Title>
|
||||
<a href="/3rdparty-app.txt">
|
||||
|
||||
@@ -24,17 +24,17 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(DmsContainer);
|
||||
|
||||
export const socket = SocketIO(
|
||||
process.env.NODE_ENV === "production"
|
||||
? process.env.REACT_APP_AXIOS_BASE_API_URL
|
||||
: window.location.origin,
|
||||
{
|
||||
path: "/ws",
|
||||
withCredentials: true,
|
||||
auth: async (callback) => {
|
||||
const token = auth.currentUser && (await auth.currentUser.getIdToken());
|
||||
callback({token});
|
||||
},
|
||||
}
|
||||
import.meta.env.PROD
|
||||
? import.meta.env.VITE_APP_AXIOS_BASE_API_URL
|
||||
: window.location.origin,
|
||||
{
|
||||
path: "/ws",
|
||||
withCredentials: true,
|
||||
auth: async (callback) => {
|
||||
const token = auth.currentUser && (await auth.currentUser.getIdToken());
|
||||
callback({ token });
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
export function DmsContainer({bodyshop, setBreadcrumbs, setSelectedHeader}) {
|
||||
|
||||
@@ -31,18 +31,18 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(DmsContainer);
|
||||
|
||||
export const socket = SocketIO(
|
||||
process.env.NODE_ENV === "production"
|
||||
? process.env.REACT_APP_AXIOS_BASE_API_URL
|
||||
: window.location.origin,
|
||||
// "http://localhost:4000", // for dev testing,
|
||||
{
|
||||
path: "/ws",
|
||||
withCredentials: true,
|
||||
auth: async (callback) => {
|
||||
const token = auth.currentUser && (await auth.currentUser.getIdToken());
|
||||
callback({token});
|
||||
},
|
||||
}
|
||||
import.meta.env.PROD
|
||||
? import.meta.env.VITE_APP_AXIOS_BASE_API_URL
|
||||
: window.location.origin,
|
||||
// "http://localhost:4000", // for dev testing,
|
||||
{
|
||||
path: "/ws",
|
||||
withCredentials: true,
|
||||
auth: async (callback) => {
|
||||
const token = auth.currentUser && (await auth.currentUser.getIdToken());
|
||||
callback({ token });
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
export function DmsContainer({bodyshop, setBreadcrumbs, setSelectedHeader}) {
|
||||
|
||||
@@ -1,24 +1,22 @@
|
||||
import React, {useEffect} from "react";
|
||||
import {connect} from "react-redux";
|
||||
import {useNavigate} from "react-router-dom";
|
||||
import {createStructuredSelector} from "reselect";
|
||||
import {selectCurrentUser} from "../../redux/user/user.selectors";
|
||||
import LandingPageStatic from "../../landing/index";
|
||||
import React, { useEffect } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { createStructuredSelector } from 'reselect';
|
||||
import { selectCurrentUser } from '../../redux/user/user.selectors';
|
||||
import { Spin } from 'antd';
|
||||
//import LandingPageStatic from "../../landing/index";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
currentUser: selectCurrentUser,
|
||||
currentUser: selectCurrentUser,
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps, null)(LandingPage);
|
||||
|
||||
export function LandingPage({currentUser}) {
|
||||
const navigate = useNavigate();
|
||||
|
||||
useEffect(() => {
|
||||
if (currentUser.authorized) {
|
||||
navigate('/manage/jobs');
|
||||
}
|
||||
}, [currentUser, navigate]);
|
||||
|
||||
return <LandingPageStatic/>;
|
||||
export function LandingPage({ currentUser }) {
|
||||
const navigate = useNavigate();
|
||||
console.log('Main');
|
||||
useEffect(() => {
|
||||
navigate('/manage/jobs');
|
||||
}, [currentUser, navigate]);
|
||||
return <Spin />;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {FloatButton, Layout} from "antd";
|
||||
import preval from "preval.macro";
|
||||
// import preval from "preval.macro";
|
||||
import React, {lazy, Suspense, useEffect, useState} from "react";
|
||||
import {useTranslation} from "react-i18next";
|
||||
import {connect} from "react-redux";
|
||||
@@ -189,6 +189,7 @@ export function Manage({conflict, bodyshop}) {
|
||||
const [chatVisible] = useState(false);
|
||||
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
const widgetId = InstanceRenderManager({ imex:"IABVNO4scRKY11XBQkNr" ,rome: "mQdqARMzkZRUVugJ6TdS"}) ;
|
||||
window.noticeable.render("widget", widgetId);
|
||||
@@ -399,8 +400,8 @@ export function Manage({conflict, bodyshop}) {
|
||||
<div style={{display: "flex"}}>
|
||||
<div>
|
||||
{`${t("titles.app")} ${
|
||||
process.env.REACT_APP_GIT_SHA
|
||||
} - ${preval`module.exports = new Date().toLocaleString("en-US", {timeZone: "America/Los_Angeles"});`}`}
|
||||
import.meta.env.VITE_APP_GIT_SHA || 'Local Build'
|
||||
} - ${import.meta.env.VITE_APP_GIT_SHA_DATE}`}
|
||||
</div>
|
||||
<div id="noticeable-widget" style={{marginLeft: "1rem"}}/>
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
// const stripePromise = new Promise((resolve, reject) => {
|
||||
// resolve(
|
||||
// loadStripe(process.env.REACT_APP_STRIPE_PUBLIC_KEY, {
|
||||
// loadStripe(import.meta.env.VITE_APP_STRIPE_PUBLIC_KEY, {
|
||||
// stripeAccount: "acct_1Fa7lFIEahEZW8b4",
|
||||
// })
|
||||
// );
|
||||
|
||||
Reference in New Issue
Block a user