Skip to content

Commit

Permalink
Upgrade react-scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
stargazer39 committed Apr 29, 2024
1 parent aa521c1 commit 587ed08
Show file tree
Hide file tree
Showing 24 changed files with 3,189 additions and 5,430 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"react-notifications": "^1.7.2",
"react-owl-carousel": "^2.3.3",
"react-router-dom": "^6.0.2",
"react-scripts": "4.0.3",
"react-scripts": "^5.0.1",
"react-scroll-to-top": "^1.0.9",
"react-select": "^5.2.1",
"react-toastify": "^8.1.1",
Expand Down
4 changes: 3 additions & 1 deletion src/components/card/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import React from "react";
import moment from "moment";
import { ICard } from "../../interfaces/CardInterface";
import { translation } from "../../locales/en-US/translation.json";
import ts from "../../locales/en-US/translation.json";

const HtmlToReactParser = require("html-to-react").Parser;

let translation = ts.translation;

const convertToPlain = (html: string) => {
const htmlToParser = new HtmlToReactParser();
const reactElement = htmlToParser.parse(html);
Expand Down
4 changes: 3 additions & 1 deletion src/components/footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react';
import {translation} from '../../locales/en-US/translation.json';
import ts from '../../locales/en-US/translation.json';

let translation = ts.translation;

const Footer: React.FC = () => (
<footer className="footer-section mt-3">
Expand Down
4 changes: 3 additions & 1 deletion src/components/nav_bar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React, { useState } from 'react';
import {translation} from '../../locales/en-US/translation.json';
import ts from '../../locales/en-US/translation.json';

let translation = ts.translation;

const NavBar: React.FC = () => {
const [isNavBarScroll, setNavbarScroll] = useState<boolean>(false);
Expand Down
4 changes: 4 additions & 0 deletions src/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ declare module "*.png" {
declare module "*.svg" {
export default "" as string;
}

declare module "*.json" {
export default {} as any
}
4 changes: 3 additions & 1 deletion src/pages/about/hero-section.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from "react";
import {translation} from '../../locales/en-US/translation.json';
import ts from '../../locales/en-US/translation.json';

let translation = ts.translation;

const HeroSection: React.FC = () => (
<div>
Expand Down
4 changes: 3 additions & 1 deletion src/pages/about/pioneers-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import React from "react";
import OwlCarousel from 'react-owl-carousel';
import pioneers from '../../data/PioneersData.json';
import { SLIDER_RESPONSIVE_BREAKPOINTS } from '../../constants';
import {translation} from '../../locales/en-US/translation.json';
import ts from '../../locales/en-US/translation.json';

let translation = ts.translation;

const PioneersSection: React.FC = () => (
<div className="pioneers">
Expand Down
4 changes: 3 additions & 1 deletion src/pages/blog/blog-list-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import { Card } from "../../components";
import { IBlog } from "../../interfaces/BlogInterface";
import { getBlogs } from "../../api/BlogAction";
import { CARD_TYPE_BLOG } from '../../constants';
import {translation} from '../../locales/en-US/translation.json';
import ts from '../../locales/en-US/translation.json';

let translation = ts.translation;

const BlogList: React.FC = () => {
const [blogList, setBlogList] = useState<IBlog>();
Expand Down
4 changes: 3 additions & 1 deletion src/pages/blog/hero-section.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from "react";
import {translation} from '../../locales/en-US/translation.json';
import ts from '../../locales/en-US/translation.json';

let translation = ts.translation;

const HeroSection: React.FC = () => (
<div className="container mb-5">
Expand Down
4 changes: 3 additions & 1 deletion src/pages/board/board-by-year.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import React, { useState, useEffect } from "react";
import { IBoard, IBoardMemberDetails } from "../../interfaces/BoardInterface";
import boardData from "../../data/BoardSectionData.json";
import BoardMemberCard from "./board-member-card";
import { translation } from "../../locales/en-US/translation.json";
import ts from "../../locales/en-US/translation.json";

let translation = ts.translation;

const BoardByYear: React.FC = () => {
const [id, setid] = useState<number>(0);
Expand Down
4 changes: 3 additions & 1 deletion src/pages/contact/contact-form-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import { yupResolver } from '@hookform/resolvers/yup';
import * as Yup from 'yup';
import { ToastContainer, toast } from "react-toastify";
import { sendMessage } from "../../api/ContactAction";
import {translation} from '../../locales/en-US/translation.json';
import ts from '../../locales/en-US/translation.json';

let translation = ts.translation;

type IContactFormSection = {
name: string;
Expand Down
4 changes: 3 additions & 1 deletion src/pages/contact/hero-section.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react';
import {translation} from '../../locales/en-US/translation.json';
import ts from '../../locales/en-US/translation.json';

let translation = ts.translation;

const HeroSection: React.FC = () => (
<div className="container mb-5">
Expand Down
4 changes: 3 additions & 1 deletion src/pages/event/hero-section.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react';
import {translation} from '../../locales/en-US/translation.json';
import ts from '../../locales/en-US/translation.json';

let translation = ts.translation;

const HeroSection: React.FC = () => (
<div className="container mb-5">
Expand Down
8 changes: 6 additions & 2 deletions src/pages/event/past-events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ import Slider from "react-owl-carousel";
import {IEvent} from "../../interfaces/EventInterface";
import {CARD_TYPE_EVENT, SLIDER_RESPONSIVE_BREAKPOINTS,} from "../../constants";
import {Card, NoContent} from "../../components";
import {translation} from "../../locales/en-US/translation.json";
import {EventData} from '../../data/PastEventData.json';
import ts from "../../locales/en-US/translation.json";
import ev from '../../data/PastEventData.json';

let EventData = ev.EventData;

let translation = ts.translation;

const PastEvents: React.FC = () => {
let slider: any;
Expand Down
4 changes: 3 additions & 1 deletion src/pages/event/past-webina.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import {
SLIDER_RESPONSIVE_BREAKPOINTS,
} from "../../constants";
import Slider from "react-owl-carousel";
import { translation } from "../../locales/en-US/translation.json";
import ts from "../../locales/en-US/translation.json";
import { IWebinar } from "../../interfaces/WebinarInterface";
import { getWebinars } from "../../api/WebinarAction";

let translation = ts.translation;

const PastWebinars: React.FC = () => {
let slider: any;
let keyboardCode: number;
Expand Down
4 changes: 3 additions & 1 deletion src/pages/event/top-speakers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ import {
} from "../../constants";
import Slider from "react-owl-carousel";
// import speakers from '../../data/TopSpeakersData.json';
import { translation } from "../../locales/en-US/translation.json";
import ts from "../../locales/en-US/translation.json";

import { getTopSpeakers } from "../../api/TopSpeakerAction";
import { ITopSpeaker } from "../../interfaces/TopSpeakerInterface";

let translation = ts.translation;

const TopSpeakers: React.FC = () => {
let slider: any;
let keyboardCode: number;
Expand Down
4 changes: 3 additions & 1 deletion src/pages/home/blogs-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import { getBlogs } from "../../api/BlogAction";
import Slider from "react-owl-carousel";
import { Card } from "../../components";
import { CARD_TYPE_BLOG, SLIDER_RESPONSIVE_BREAKPOINTS } from '../../constants';
import {translation} from '../../locales/en-US/translation.json';
import ts from '../../locales/en-US/translation.json';

let translation = ts.translation;

const BlogSection: React.FC = () => {
let slider: any;
Expand Down
4 changes: 3 additions & 1 deletion src/pages/home/hero-section.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { ContactShadows, OrbitControls } from "@react-three/drei";
import {translation} from '../../locales/en-US/translation.json';
import ts from '../../locales/en-US/translation.json';
import { Canvas } from "@react-three/fiber";
import React, { Suspense } from "react";
import { Logo3DModel } from "../../components";

let translation = ts.translation;

const HeroSection: React.FC = () => (
<div className="container mb-5">
<div className="hero-section-bg" />
Expand Down
4 changes: 3 additions & 1 deletion src/pages/home/past-events-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import {
SLIDER_RESPONSIVE_BREAKPOINTS,
} from "../../constants";
import { Card, NoContent } from "../../components";
import { translation } from "../../locales/en-US/translation.json";
import ts from "../../locales/en-US/translation.json";

let translation = ts.translation;

const PastEventSection: React.FC = () => {
let slider: any;
Expand Down
4 changes: 3 additions & 1 deletion src/pages/home/past-webinars-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import {
import { Card, NoContent } from "../../components";
import {getPastWebinars} from "../../api/WebinarAction";
import {IWebinar} from "../../interfaces/WebinarInterface";
import { translation } from "../../locales/en-US/translation.json";
import ts from "../../locales/en-US/translation.json";

let translation = ts.translation;

const PastWebinarSection: React.FC = () => {
let slider: any;
Expand Down
4 changes: 3 additions & 1 deletion src/pages/home/who-we-are-section.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from "react";
import {translation} from '../../locales/en-US/translation.json';
import ts from '../../locales/en-US/translation.json';

let translation = ts.translation;

const WhatWeDoSection: React.FC = () => (
<div className="who-we-are-section">
Expand Down
4 changes: 3 additions & 1 deletion src/pages/join_us/hero-section.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from "react";
import {translation} from '../../locales/en-US/translation.json';
import ts from '../../locales/en-US/translation.json';

let translation = ts.translation;

const HeroSection: React.FC = () => (
<div className="container mb-5">
Expand Down
4 changes: 3 additions & 1 deletion src/pages/join_us/join-us-form-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import { yupResolver } from "@hookform/resolvers/yup";
import * as Yup from "yup";
import { ToastContainer, toast } from "react-toastify";
import { submitApplication } from "../../api/ApplicationAction";
import {translation} from '../../locales/en-US/translation.json';
import ts from '../../locales/en-US/translation.json';

let translation = ts.translation

const options = [
{ value: "Public Speaking", label: "Public Speaking" },
Expand Down
Loading

0 comments on commit 587ed08

Please sign in to comment.