This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useEffect, useRef, useCallback } from "react"; | |
import ReactDOM from "react-dom"; | |
const UseBlankWindow = ({ children, closeWindowPortal }) => { | |
const [containerEl, setContainerEl] = useState(null); | |
const externalWindow = useRef(null); | |
useEffect(() => { | |
//open a new window without url (you could specific title here if you want) | |
externalWindow.current = window.open( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const webpack = require("webpack"); | |
const path = require("path"); | |
const MiniCssExtractPlugin = require("mini-css-extract-plugin"); | |
const HtmlWebpackPlugin = require("html-webpack-plugin"); | |
const InterpolateHtmlPlugin = require("react-dev-utils/InterpolateHtmlPlugin"); | |
module.exports = { | |
mode: "development", | |
target: "web", | |
entry: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require("express"); | |
const path = require("path"); | |
const https = require("https"); | |
const fs = require("fs"); | |
const app = express(); | |
console.log(process.env.NODE_ENV); | |
if (process.env.NODE_ENV !== "production") { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const style = () => { | |
if (animation) | |
if (action === "next") { | |
return { | |
transform: `translateX(-${(100 / 3) * 2}%)`, | |
transition: "transform 0.1s", | |
}; | |
} else if (action === "prev") { | |
return { | |
transform: `translateX(0%)`, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// dev.js - don't commit this!!! | |
type Config = { mongoURI: string; cookieKey: string }; | |
const config: Config = { | |
mongoURI: | |
"mogoUrl", | |
cookieKey: "cookieKey", | |
}; | |
export { config }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useRef, useEffect } from "react"; | |
import { inputTypes, InputData } from "../types/input.types"; | |
import { Field, reduxForm, InjectedFormProps } from "redux-form"; | |
import { Icon } from "semantic-ui-react"; | |
import InputField from "./General/InputFields.js/InputField"; | |
import { connect } from "react-redux"; | |
interface RowProps { | |
index: number; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useRef, useEffect } from "react"; | |
import { inputTypes, InputData } from "../types/input.types"; | |
import { Field, reduxForm, InjectedFormProps } from "redux-form"; | |
import { Icon } from "semantic-ui-react"; | |
import InputField from "./General/InputFields.js/InputField"; | |
import { connect } from "react-redux"; | |
interface RowProps { | |
index: number; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import createCusContext, { DispatchType } from "./createCusContext"; | |
export type PageState = { | |
currentPage: number; | |
totalPage: number; | |
}; | |
export enum PageTypesEnums { | |
FORWARD_PAGE = "FORWARD_PAGE", | |
BACKWARD_PAGE = "BACKWARD_PAGE", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { | |
useState, | |
useEffect, | |
useCallback, | |
useMemo, | |
ReactElement, | |
} from "react"; | |
import { isScreenLessThanWidth } from "../../../../tools/format.checker"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NavigationContainer } from "@react-navigation/native"; | |
import { createStackNavigator } from "@react-navigation/stack"; | |
import React, { useContext } from "react"; | |
import { RootStackParamsList } from "./src/configs/navigation.configs"; | |
import AuthSuspend from "./src/page/Feature/AuthSuspend/AuthSuspend"; | |
import LoginApp from "./src/page/Login/LoginApp"; | |
import MainApp from "./src/page/Main/MainApp"; | |
import { AuthContext, AuthProvider } from "./src/context/authContext"; | |
const RootStack = createStackNavigator<RootStackParamsList>(); |
OlderNewer