├── .env ├── .gitignore ├── .prettierrc ├── README.md ├── config-overrides.js ├── package.json ├── public ├── favicon.ico ├── index.html ├── logo.png ├── logo192.png ├── logo512.png ├── manifest.json └── robots.txt ├── src ├── app │ ├── routes.ts │ └── store.ts ├── assets │ ├── icons │ │ ├── avatar-blank.png │ │ ├── logo.png │ │ ├── tether.png │ │ ├── xmr.svg │ │ └── xrp.svg │ └── images │ │ └── sidebar-background.jpg ├── common │ ├── api │ │ └── auth.ts │ ├── services │ │ ├── auth-api-service.ts │ │ └── http-api-service.ts │ └── types │ │ └── auth-types.ts ├── components │ ├── form-button │ │ ├── index.tsx │ │ └── styled.ts │ ├── form-card │ │ ├── index.tsx │ │ └── styled.ts │ ├── form-input │ │ ├── index.tsx │ │ └── styled.ts │ ├── highlight-button │ │ ├── index.tsx │ │ └── styled.ts │ ├── loading │ │ ├── index.tsx │ │ └── styled.ts │ └── toastr │ │ └── index.tsx ├── config │ └── index.ts ├── containers │ ├── 404 │ │ ├── 404.css │ │ └── index.tsx │ ├── add-funds │ │ ├── index.tsx │ │ └── styled.ts │ ├── app │ │ └── index.tsx │ ├── layout │ │ ├── auth-layout │ │ │ ├── footer │ │ │ │ ├── index.tsx │ │ │ │ └── styled.ts │ │ │ ├── header │ │ │ │ ├── index.tsx │ │ │ │ └── styled.ts │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ └── main-layout │ │ │ ├── content │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ │ ├── footer │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ │ ├── header │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ │ ├── index.tsx │ │ │ ├── sidebar │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ │ └── styled.ts │ ├── quick-sms │ │ ├── index.tsx │ │ └── styled.ts │ ├── sendout-history │ │ ├── index.tsx │ │ └── styled.ts │ ├── signin │ │ ├── index.tsx │ │ └── styled.ts │ └── signup │ │ ├── index.tsx │ │ └── styled.ts ├── features │ ├── auth-slice.ts │ └── menu-slice.ts ├── hocs │ └── require-auth.tsx ├── hooks │ ├── use-app-dispatch.ts │ └── use-app-seletecor.ts ├── index.css ├── index.tsx ├── react-app-env.d.ts ├── serviceWorker.ts ├── setupTests.ts ├── styles │ ├── global.ts │ ├── mq.ts │ ├── theme.ts │ └── typography.ts └── validation │ ├── is-email.ts │ └── is-empty.ts ├── tsconfig.json ├── tsconfig.paths.json └── yarn.lock /.env: -------------------------------------------------------------------------------- 1 | NODE_PATH=./ -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 150, 3 | "tabWidth": 2, 4 | "singleQuote": true, 5 | "trailingComma": "all", 6 | "semi": true, 7 | "arrowParens": "avoid" 8 | } 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app), using the [Redux](https://redux.js.org/) and [Redux Toolkit](https://redux-toolkit.js.org/) template. 2 | 3 | ## Available Scripts 4 | 5 | In the project directory, you can run: 6 | 7 | ### `yarn start` 8 | 9 | Runs the app in the development mode.
10 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 11 | 12 | The page will reload if you make edits.
13 | You will also see any lint errors in the console. 14 | 15 | ### `yarn test` 16 | 17 | Launches the test runner in the interactive watch mode.
18 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 19 | 20 | ### `yarn build` 21 | 22 | Builds the app for production to the `build` folder.
23 | It correctly bundles React in production mode and optimizes the build for the best performance. 24 | 25 | The build is minified and the filenames include the hashes.
26 | Your app is ready to be deployed! 27 | 28 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 29 | 30 | ### `yarn eject` 31 | 32 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!** 33 | 34 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 35 | 36 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. 37 | 38 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. 39 | 40 | ## Learn More 41 | 42 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 43 | 44 | To learn React, check out the [React documentation](https://reactjs.org/). 45 | -------------------------------------------------------------------------------- /config-overrides.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | module.exports = function override(config) { 4 | config.resolve = { 5 | ...config.resolve, 6 | alias: { 7 | ...config.alias, 8 | '/*': path.resolve(__dirname, 'src/*'), 9 | 'app/*': path.resolve(__dirname, 'src/app/*'), 10 | 'assets/*': path.resolve(__dirname, 'src/assets/*'), 11 | 'common/*': path.resolve(__dirname, 'src/common/*'), 12 | 'components/*': path.resolve(__dirname, 'src/components/*'), 13 | 'containers/*': path.resolve(__dirname, 'src/containers/*'), 14 | 'context/*': path.resolve(__dirname, 'src/context/*'), 15 | 'hocs/*': path.resolve(__dirname, 'src/hocs/*'), 16 | 'hooks/*': path.resolve(__dirname, 'src/hooks/*'), 17 | 'styles/*': path.resolve(__dirname, 'src/styles/*'), 18 | 'validation/*': path.resolve(__dirname, 'src/validation/*'), 19 | 'features/*': path.resolve(__dirname, 'src/features/*'), 20 | }, 21 | }; 22 | 23 | return config; 24 | }; 25 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "my-app", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@reduxjs/toolkit": "^1.5.1", 7 | "@testing-library/jest-dom": "^4.2.4", 8 | "@testing-library/react": "^9.3.2", 9 | "@testing-library/user-event": "^7.1.2", 10 | "@types/jest": "^24.0.0", 11 | "@types/node": "^12.0.0", 12 | "@types/react": "^16.9.0", 13 | "@types/react-dom": "^16.9.0", 14 | "@types/react-redux": "^7.1.7", 15 | "axios": "^0.24.0", 16 | "js-cookie": "^3.0.1", 17 | "jwt-decode": "^3.1.2", 18 | "react": "^17.0.2", 19 | "react-dom": "^17.0.2", 20 | "react-icons": "^4.3.1", 21 | "react-perfect-scrollbar": "^1.5.8", 22 | "react-pro-sidebar": "^0.7.1", 23 | "react-redux": "^7.2.0", 24 | "react-router-dom": "5.2.0", 25 | "react-scripts": "4.0.3", 26 | "react-spinners": "^0.11.0", 27 | "react-toastify": "^8.1.0", 28 | "redux-persist": "^6.0.0", 29 | "styled-components": "^5.3.3", 30 | "typescript": "~4.1.5" 31 | }, 32 | "scripts": { 33 | "start": "react-app-rewired start", 34 | "build": "react-app-rewired build", 35 | "test": "react-app-rewired test", 36 | "eject": "react-app-rewired eject" 37 | }, 38 | "eslintConfig": { 39 | "extends": "react-app" 40 | }, 41 | "browserslist": { 42 | "production": [ 43 | ">0.2%", 44 | "not dead", 45 | "not op_mini all" 46 | ], 47 | "development": [ 48 | "last 1 chrome version", 49 | "last 1 firefox version", 50 | "last 1 safari version" 51 | ] 52 | }, 53 | "devDependencies": { 54 | "@types/js-cookie": "^3.0.1", 55 | "@types/react-router-dom": "^5.3.2", 56 | "@types/redux-persist": "^4.3.1", 57 | "@types/styled-components": "^5.1.15", 58 | "react-app-rewired": "^2.1.8" 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naruhitokaide/react-ts/ab9252425d511547d88a15af9f7e0fe7f6318fd5/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 15 | 24 | Supremacy SMS 25 | 26 | 27 | 28 |
29 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naruhitokaide/react-ts/ab9252425d511547d88a15af9f7e0fe7f6318fd5/public/logo.png -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naruhitokaide/react-ts/ab9252425d511547d88a15af9f7e0fe7f6318fd5/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naruhitokaide/react-ts/ab9252425d511547d88a15af9f7e0fe7f6318fd5/public/logo512.png -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /src/app/routes.ts: -------------------------------------------------------------------------------- 1 | import { lazy } from 'react'; 2 | 3 | //lazy loading for all layouts and components 4 | const AuthLayout = lazy(() => import('containers/layout/auth-layout')); 5 | const MainLayout = lazy(() => import('containers/layout/main-layout')); 6 | const SignIn = lazy(() => import('containers/signin')); 7 | const SignUp = lazy(() => import('containers/signup')); 8 | const QuickSMS = lazy(() => import('containers/quick-sms')); 9 | const AddFunds = lazy(() => import('containers/add-funds')); 10 | const SendoutHistory = lazy(() => import('containers/sendout-history')); 11 | 12 | // routes 13 | export type RouteType = { 14 | path: string; 15 | exact: boolean; 16 | layout: any; 17 | component: any; 18 | }; 19 | 20 | const routes: RouteType[] = [ 21 | { path: '/signin', exact: true, layout: AuthLayout, component: SignIn }, 22 | { path: '/signup', exact: true, layout: AuthLayout, component: SignUp }, 23 | { path: '/quick-sms', exact: true, layout: MainLayout, component: QuickSMS }, 24 | { path: '/add-funds', exact: true, layout: MainLayout, component: AddFunds }, 25 | { path: '/sendout-history', exact: true, layout: MainLayout, component: SendoutHistory }, 26 | ]; 27 | 28 | export default routes; 29 | -------------------------------------------------------------------------------- /src/app/store.ts: -------------------------------------------------------------------------------- 1 | import { configureStore, ThunkAction, Action } from '@reduxjs/toolkit'; 2 | import storage from 'redux-persist/lib/storage'; 3 | import { combineReducers } from 'redux'; 4 | import { persistReducer } from 'redux-persist'; 5 | import thunk from 'redux-thunk'; 6 | import authReducer from 'features/auth-slice'; 7 | import menuReducer from 'features/menu-slice'; 8 | 9 | const reducers = combineReducers({ 10 | auth: authReducer, 11 | menu: menuReducer, 12 | }); 13 | 14 | const persistConfig = { 15 | key: 'root', 16 | storage, 17 | whitelist: ['auth', 'menu'], 18 | }; 19 | 20 | const persistedReducer = persistReducer(persistConfig, reducers); 21 | 22 | const store = configureStore({ 23 | reducer: persistedReducer, 24 | devTools: process.env.NODE_ENV !== 'production', 25 | middleware: [thunk], 26 | }); 27 | 28 | export default store; 29 | 30 | export type AppDispatch = typeof store.dispatch; 31 | export type RootState = ReturnType; 32 | export type AppThunk = ThunkAction>; 33 | -------------------------------------------------------------------------------- /src/assets/icons/avatar-blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naruhitokaide/react-ts/ab9252425d511547d88a15af9f7e0fe7f6318fd5/src/assets/icons/avatar-blank.png -------------------------------------------------------------------------------- /src/assets/icons/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naruhitokaide/react-ts/ab9252425d511547d88a15af9f7e0fe7f6318fd5/src/assets/icons/logo.png -------------------------------------------------------------------------------- /src/assets/icons/tether.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naruhitokaide/react-ts/ab9252425d511547d88a15af9f7e0fe7f6318fd5/src/assets/icons/tether.png -------------------------------------------------------------------------------- /src/assets/icons/xmr.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/xrp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/images/sidebar-background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naruhitokaide/react-ts/ab9252425d511547d88a15af9f7e0fe7f6318fd5/src/assets/images/sidebar-background.jpg -------------------------------------------------------------------------------- /src/common/api/auth.ts: -------------------------------------------------------------------------------- 1 | import Cookies from 'js-cookie'; 2 | import jwtDecode from 'jwt-decode'; 3 | import { TokenResponse } from 'common/types/auth-types'; 4 | 5 | const ACCESS_TOKEN = 'access_token'; 6 | const USER_HANDLE = 'user_handle'; 7 | 8 | const isTokenValid = (token: string) => { 9 | try { 10 | const decoded: { exp: number } = jwtDecode(token); 11 | return new Date(decoded.exp * 1000) > new Date(); 12 | } catch { 13 | return false; 14 | } 15 | }; 16 | 17 | const login = (payload: TokenResponse) => { 18 | Cookies.set(ACCESS_TOKEN, payload.api_token); 19 | Cookies.set(USER_HANDLE, payload.handle); 20 | }; 21 | 22 | const logout = () => { 23 | Cookies.remove(ACCESS_TOKEN); 24 | Cookies.remove(USER_HANDLE); 25 | }; 26 | 27 | const getToken = () => Cookies.get(ACCESS_TOKEN); 28 | 29 | const getUserHandle = () => Cookies.get(USER_HANDLE); 30 | 31 | const isAuthenticated = () => { 32 | const token = getToken(); 33 | const userHandle = getUserHandle(); 34 | if (!token || !userHandle) { 35 | return false; 36 | } 37 | return isTokenValid(token); 38 | }; 39 | 40 | const authApi = { 41 | login, 42 | logout, 43 | getToken, 44 | getUserHandle, 45 | isAuthenticated, 46 | isTokenValid, 47 | }; 48 | 49 | export default authApi; 50 | -------------------------------------------------------------------------------- /src/common/services/auth-api-service.ts: -------------------------------------------------------------------------------- 1 | import HttpApiService from './http-api-service'; 2 | import { config } from 'config'; 3 | import { CreateUser, CheckAccount } from 'common/types/auth-types'; 4 | 5 | const API_BASE = `${config.apiUrl}`; 6 | 7 | class AuthApiService extends HttpApiService { 8 | constructor() { 9 | super(`${API_BASE}`); 10 | } 11 | 12 | signUp = (userData: CreateUser) => { 13 | return this.create('/signup', userData); 14 | }; 15 | 16 | signIn = (accountData: CheckAccount) => { 17 | return this.post('/signin', accountData); 18 | }; 19 | 20 | signOut = () => { 21 | return this.get('/signout'); 22 | }; 23 | } 24 | 25 | export default AuthApiService; 26 | -------------------------------------------------------------------------------- /src/common/services/http-api-service.ts: -------------------------------------------------------------------------------- 1 | import axios, { AxiosInstance, AxiosPromise, AxiosResponse } from 'axios'; 2 | import authApi from 'common/api/auth'; 3 | import isEmpty from 'validation/is-empty'; 4 | import {config} from 'config'; 5 | 6 | class HttpApiService { 7 | private _axiosInstance: AxiosInstance | undefined; 8 | private readonly _baseURL: string; 9 | 10 | constructor(baseURL: string) { 11 | this._baseURL = baseURL; 12 | this.createAxiosInstance(); 13 | } 14 | 15 | private defaultOptions = (): any => { 16 | let headers: any = {}; 17 | if (isEmpty(authApi.getToken())) { 18 | headers = { 19 | Accept: 'application/json', 20 | }; 21 | } else { 22 | headers = { 23 | Accept: 'application/json', 24 | Authorization: config.tokenSuffix + authApi.getToken(), 25 | }; 26 | } 27 | 28 | return { 29 | baseURL: this._baseURL, 30 | withCredentials: true, // Window Authentification 31 | headers, 32 | }; 33 | }; 34 | 35 | /** 36 | * Create instance 37 | */ 38 | private createAxiosInstance() { 39 | this._axiosInstance = axios.create(this.defaultOptions()); 40 | // this.checkAutorization() 41 | 42 | // Add a request interceptor 43 | this._axiosInstance.interceptors.request.use( 44 | config => config, 45 | error => { 46 | return Promise.reject(error); 47 | }, 48 | ); 49 | 50 | // Add a response interceptor 51 | this._axiosInstance.interceptors.response.use(this.handleSuccess, this.handleError); 52 | } 53 | 54 | public get(endpoint: string, conf = {}): AxiosPromise { 55 | return new Promise((resolve, reject) => { 56 | this._axiosInstance!.get(`${endpoint}`, conf) 57 | .then(response => { 58 | resolve(response); 59 | }) 60 | .catch(error => { 61 | reject(error); 62 | }); 63 | }); 64 | } 65 | 66 | public create(endpoint: string, data: {}, conf = {}): AxiosPromise { 67 | return this.post(endpoint, data, conf); 68 | } 69 | 70 | public post(endpoint: string, data: {}, conf = {}): AxiosPromise { 71 | return new Promise((resolve, reject) => { 72 | this._axiosInstance!.post(`${endpoint}`, data, conf) 73 | .then(response => { 74 | resolve(response); 75 | }) 76 | .catch(error => { 77 | reject(error); 78 | }); 79 | }); 80 | } 81 | 82 | public update(endpoint: string, data: {}, conf = {}): AxiosPromise { 83 | return new Promise((resolve, reject) => { 84 | this._axiosInstance!.put(`${endpoint}`, data, conf) 85 | .then(response => { 86 | resolve(response); 87 | }) 88 | .catch(error => { 89 | reject(error); 90 | }); 91 | }); 92 | } 93 | 94 | public delete(endpoint: string, id: any, conf = {}): AxiosPromise { 95 | return new Promise((resolve, reject) => { 96 | this._axiosInstance!.delete(`${endpoint}/${id}`, conf) 97 | .then(response => { 98 | resolve(response); 99 | }) 100 | .catch(error => { 101 | reject(error); 102 | }); 103 | }); 104 | } 105 | 106 | public deleteFile(endpoint: string, conf = {}): AxiosPromise { 107 | return new Promise((resolve, reject) => { 108 | this._axiosInstance!.delete(`${endpoint}`, conf) 109 | .then(response => { 110 | resolve(response); 111 | }) 112 | .catch(error => { 113 | reject(error); 114 | }); 115 | }); 116 | } 117 | 118 | public uploadFile(endpoint: string, data: FormData, conf = {}): AxiosPromise { 119 | return this.post(endpoint, data, conf); 120 | } 121 | 122 | public downloadFile(endpoint: string): AxiosPromise { 123 | const conf = { 124 | responseType: 'blob', // important 125 | timeout: 30000, 126 | }; 127 | return this.get(endpoint, conf); 128 | } 129 | 130 | handleSuccess(response: AxiosResponse) { 131 | // console.log('handleSuccess' + JSON.stringify(response)) 132 | return response; 133 | } 134 | 135 | handleError = (err: any) => { 136 | let errorStatement: string = ''; 137 | if (!err.response) { 138 | console.log(`Network error: ${err}`); 139 | errorStatement = err.message; 140 | } else { 141 | if (err.response) { 142 | const { status } = err.response; 143 | console.log(`HttpService::Error(${status}) : ${err.response.data.message}`); 144 | errorStatement = err.response.data.message; 145 | } 146 | } 147 | return Promise.reject(errorStatement); 148 | }; 149 | 150 | redirectTo = (document: any, path: string) => { 151 | document.location = path; 152 | }; 153 | } 154 | 155 | export default HttpApiService; 156 | -------------------------------------------------------------------------------- /src/common/types/auth-types.ts: -------------------------------------------------------------------------------- 1 | export type CreateUser = { 2 | email: string; 3 | password: string; 4 | userName: string; 5 | }; 6 | 7 | export type CheckAccount = { 8 | account: string; 9 | password: string; 10 | }; 11 | 12 | export type TokenResponse = { 13 | api_token: string; 14 | handle: string; 15 | }; 16 | 17 | export type CurrentUser = { 18 | _id: string; 19 | email: string; 20 | userName: string; 21 | }; 22 | -------------------------------------------------------------------------------- /src/components/form-button/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { StyledButton } from './styled'; 3 | import { PuffLoader } from 'react-spinners'; 4 | 5 | interface Props { 6 | children: any; 7 | variant?: 'primary' | 'secondary'; 8 | onClick: Function; 9 | loading: boolean; 10 | } 11 | 12 | const FormButton: React.FC = props => { 13 | const { variant, onClick, children, loading } = props; 14 | 15 | return ( 16 | onClick()} disabled={loading}> 17 | 18 | {children} 19 | 20 | ); 21 | }; 22 | 23 | export default FormButton; 24 | -------------------------------------------------------------------------------- /src/components/form-button/styled.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | import theme from 'styles/theme'; 3 | 4 | interface Props { 5 | variant?: string; 6 | } 7 | 8 | export const StyledButton = styled.button` 9 | display: flex; 10 | justify-content: center; 11 | align-items: center; 12 | border: none; 13 | margin: 10px 0; 14 | padding: 8px 16px; 15 | color: white; 16 | width: 100%; 17 | background: ${({ variant }) => { 18 | switch (variant) { 19 | case 'primary': 20 | return theme.color.button.primary; 21 | case 'secondary': 22 | return theme.color.button.secondary; 23 | default: 24 | return theme.color.button.primary; 25 | } 26 | }}; 27 | line-height: 1.5; 28 | cursor: pointer; 29 | transition: all 0.2s ease-in-out; 30 | 31 | :disabled { 32 | opacity: 0.65; 33 | } 34 | :hover { 35 | margin: 7px 0 13px 0; 36 | } 37 | :active { 38 | transform: scale(0.95); 39 | } 40 | `; 41 | -------------------------------------------------------------------------------- /src/components/form-card/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { StyledCard } from './styled'; 3 | 4 | interface Props { 5 | children: any; 6 | onKeyDown: Function; 7 | } 8 | 9 | const FormCard: React.FC = props => { 10 | const { children, onKeyDown } = props; 11 | return onKeyDown(e)}>{children}; 12 | }; 13 | 14 | export default FormCard; 15 | -------------------------------------------------------------------------------- /src/components/form-card/styled.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export const StyledCard = styled.div` 4 | display: flex; 5 | flex-direction: column; 6 | border-radius: 5px; 7 | padding: 24px 30px; 8 | box-shadow: 0 10px 34px -15px rgb(245 245 247); 9 | text-align: center; 10 | align-items: center; 11 | min-width: 350px; 12 | position: relative; 13 | z-index: 0; 14 | `; 15 | -------------------------------------------------------------------------------- /src/components/form-input/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { StyledInput } from './styled'; 3 | 4 | interface Props { 5 | name?: string; 6 | type?: 'text' | 'password' | 'email'; 7 | value?: string; 8 | placeholder?: string; 9 | onChange: Function; 10 | } 11 | 12 | const FormInput: React.FC = props => { 13 | const { name, type, value, placeholder, onChange } = props; 14 | return onChange(e)} />; 15 | }; 16 | 17 | export default FormInput; 18 | -------------------------------------------------------------------------------- /src/components/form-input/styled.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export const StyledInput = styled.input` 4 | font-size: 15px; 5 | letter-spacing: 1px; 6 | color: #3b3f5c; 7 | margin: 10px 0; 8 | padding: 12px 20px; 9 | outline: none; 10 | border: 1px solid #3b3f5c; 11 | width: 100%; 12 | `; 13 | -------------------------------------------------------------------------------- /src/components/highlight-button/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { StyledButton } from './styled'; 3 | import { PuffLoader } from 'react-spinners'; 4 | 5 | interface Props { 6 | children: any; 7 | onClick: Function; 8 | loading: boolean; 9 | } 10 | 11 | const HighlightButton: React.FC = props => { 12 | const { onClick, children, loading } = props; 13 | 14 | return ( 15 | onClick()} disabled={loading}> 16 | 17 | {!loading && children} 18 | 19 | ); 20 | }; 21 | 22 | export default HighlightButton; 23 | -------------------------------------------------------------------------------- /src/components/highlight-button/styled.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export const StyledButton = styled.button` 4 | display: flex; 5 | align-items: center; 6 | justify-content: center; 7 | background: linear-gradient(65.4deg, #4e89fe 18.74%, #6ac7fc 88.33%); 8 | border-radius: 5px; 9 | padding: 8px 16px; 10 | color: white; 11 | width: 100%; 12 | border: none; 13 | cursor: pointer; 14 | :hover { 15 | background: linear-gradient(65.4deg, #6ac7fc 15.74%, #4e89fe 78.33%); 16 | } 17 | :active { 18 | transform: scale(0.95); 19 | } 20 | :disabled { 21 | padding: 8px 8px; 22 | box-shadow: 0 0px 0px 0 rgba(0, 0, 0, 0.2), 0 0px 0px 0 rgba(0, 0, 0, 0.19); 23 | } 24 | 25 | label { 26 | margin-left: 5px; 27 | cursor: pointer; 28 | } 29 | 30 | box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 31 | `; 32 | -------------------------------------------------------------------------------- /src/components/loading/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { CustomLoadingWrapper, CustomLoadingContent, Label } from './styled'; 3 | 4 | const Loading: React.FC = () => { 5 | return ( 6 | 7 | 8 | Loading 9 | 11 | 12 | ); 13 | }; 14 | 15 | export default Loading; 16 | -------------------------------------------------------------------------------- /src/components/loading/styled.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | import theme from 'styles/theme'; 3 | 4 | export const CustomLoadingWrapper = styled.div` 5 | display: flex; 6 | width: 100%; 7 | height: 100%; 8 | left: 0%; 9 | top: 0%; 10 | align-items: center; 11 | justify-content: center; 12 | position: fixed; 13 | z-index: 99999; 14 | background: ${theme.color.background.dark}; 15 | flex-direction: column; 16 | `; 17 | export const CustomLoadingContent = styled.div` 18 | position: absolute; 19 | top: 50%; 20 | left: 50%; 21 | transform: translate(-50%, -50%); 22 | width: 150px; 23 | height: 150px; 24 | background: transparent; 25 | border: 3px solid #3c3c3c; 26 | border-radius: 50%; 27 | text-align: center; 28 | line-height: 150px; 29 | font-family: sans-serif; 30 | font-size: 20px; 31 | color: #fff000; 32 | letter-spacing: 4px; 33 | text-transform: uppercase; 34 | text-shadow: 0 0 10px #fff000; 35 | box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); 36 | &:before { 37 | content: ''; 38 | position: absolute; 39 | top: -3px; 40 | left: -3px; 41 | width: 100%; 42 | height: 100%; 43 | border: 3px solid transparent; 44 | border-top: 3px solid #fff000; 45 | border-right: 3px solid #fff000; 46 | border-radius: 50%; 47 | animation: animateC 2s linear infinite; 48 | @keyframes animateC { 49 | 0% { 50 | transform: rotate(0deg); 51 | } 52 | 100% { 53 | transform: rotate(360deg); 54 | } 55 | } 56 | } 57 | `; 58 | export const Label = styled.span` 59 | display: block; 60 | position: absolute; 61 | top: calc(50% - 2px); 62 | left: 50%; 63 | width: 50%; 64 | height: 4px; 65 | background: transparent; 66 | transform-origin: left; 67 | animation: animate 2s linear infinite; 68 | @keyframes animate { 69 | 0% { 70 | transform: rotate(45deg); 71 | } 72 | 100% { 73 | transform: rotate(405deg); 74 | } 75 | } 76 | &:before { 77 | content: ''; 78 | position: absolute; 79 | width: 16px; 80 | height: 16px; 81 | border-radius: 50%; 82 | background: #fff000; 83 | top: -6px; 84 | right: -8px; 85 | box-shadow: 0 0 20px #fff000; 86 | } 87 | `; 88 | -------------------------------------------------------------------------------- /src/components/toastr/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { ToastContainer } from 'react-toastify'; 3 | 4 | const Toastr: React.FC = () => { 5 | return ( 6 | 18 | ); 19 | }; 20 | 21 | export default Toastr; 22 | -------------------------------------------------------------------------------- /src/config/index.ts: -------------------------------------------------------------------------------- 1 | export const config = { 2 | apiUrl: 'http://localhost:5000', 3 | tokenSuffix: 'Supremacy ', 4 | }; 5 | -------------------------------------------------------------------------------- /src/containers/404/404.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css?family=Fira+Sans'); 2 | /*Variables*/ 3 | .left-section .inner-content { 4 | position: absolute; 5 | top: 50%; 6 | transform: translateY(-50%); 7 | } 8 | 9 | .background { 10 | position: absolute; 11 | top: 0; 12 | left: 0; 13 | width: 100%; 14 | height: 100%; 15 | background: linear-gradient(#010a0c, #151839bb); 16 | color: #f5f6fa; 17 | font-family: 'Fira Sans', sans-serif; 18 | } 19 | 20 | .background .ground { 21 | position: absolute; 22 | bottom: 0; 23 | width: 100%; 24 | height: 25vh; 25 | background: #0c0e10; 26 | } 27 | 28 | @media (max-width: 770px) { 29 | .background .ground { 30 | height: 0vh; 31 | } 32 | } 33 | 34 | .container { 35 | position: relative; 36 | margin: 0 auto; 37 | width: 85%; 38 | height: 100vh; 39 | padding-bottom: 25vh; 40 | display: flex; 41 | flex-direction: row; 42 | justify-content: space-around; 43 | } 44 | 45 | @media (max-width: 770px) { 46 | .container { 47 | flex-direction: column; 48 | padding-bottom: 0vh; 49 | } 50 | } 51 | 52 | .home { 53 | text-align: center; 54 | max-width: 480px; 55 | font-size: 0.8em; 56 | padding: 0 1rem; 57 | margin: 0 auto; 58 | color: #f5f6fa; 59 | text-shadow: 0 0 1rem #fefefe; 60 | } 61 | 62 | .left-section, 63 | .right-section { 64 | position: relative; 65 | } 66 | 67 | .left-section { 68 | width: 40%; 69 | } 70 | 71 | @media (max-width: 770px) { 72 | .left-section { 73 | width: 100%; 74 | height: 40%; 75 | position: absolute; 76 | top: 0; 77 | } 78 | } 79 | 80 | @media (max-width: 770px) { 81 | .left-section .inner-content { 82 | position: relative; 83 | padding: 1rem 0; 84 | } 85 | } 86 | 87 | .heading { 88 | text-align: center; 89 | font-size: 9em; 90 | line-height: 1.3em; 91 | margin: 2rem 0 0.5rem 0; 92 | padding: 0; 93 | text-shadow: 0 0 1rem #fefefe; 94 | } 95 | 96 | @media (max-width: 770px) { 97 | .heading { 98 | font-size: 7em; 99 | line-height: 1.15; 100 | margin: 0; 101 | } 102 | } 103 | 104 | .subheading { 105 | text-align: center; 106 | max-width: 480px; 107 | font-size: 1.5em; 108 | line-height: 1.15em; 109 | padding: 0 1rem; 110 | margin: 0 auto; 111 | } 112 | 113 | @media (max-width: 770px) { 114 | .subheading { 115 | font-size: 1.3em; 116 | line-height: 1.15; 117 | max-width: 100%; 118 | } 119 | } 120 | 121 | .right-section { 122 | width: 50%; 123 | } 124 | 125 | @media (max-width: 770px) { 126 | .right-section { 127 | width: 100%; 128 | height: 60%; 129 | position: absolute; 130 | bottom: 0; 131 | } 132 | } 133 | 134 | .svgimg { 135 | position: absolute; 136 | bottom: 0; 137 | padding-top: 10vh; 138 | padding-left: 1vh; 139 | max-width: 100%; 140 | max-height: 100%; 141 | } 142 | 143 | @media (max-width: 770px) { 144 | .svgimg { 145 | padding: 0; 146 | } 147 | } 148 | 149 | .svgimg .bench-legs { 150 | fill: #0c0e10; 151 | } 152 | 153 | .svgimg .top-bench, 154 | .svgimg .bottom-bench { 155 | stroke: #0c0e10; 156 | stroke-width: 1px; 157 | fill: #5b3e2b; 158 | } 159 | 160 | .svgimg .bottom-bench path:nth-child(1) { 161 | fill: #432d20; 162 | } 163 | 164 | .svgimg .lamp-details { 165 | fill: #202425; 166 | } 167 | 168 | .svgimg .lamp-accent { 169 | fill: #2c3133; 170 | } 171 | 172 | .svgimg .lamp-bottom { 173 | fill: linear-gradient(#202425, #0c0e10); 174 | } 175 | 176 | .svgimg .lamp-light { 177 | fill: #efefef; 178 | } 179 | 180 | @keyframes glow { 181 | 0% { 182 | text-shadow: 0 0 1rem #fefefe; 183 | } 184 | 50% { 185 | text-shadow: 0 0 1.85rem #ededed; 186 | } 187 | 100% { 188 | text-shadow: 0 0 1rem #fefefe; 189 | } 190 | } 191 | -------------------------------------------------------------------------------- /src/containers/404/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Link } from 'react-router-dom'; 3 | import { setSelectedIndex } from 'features/menu-slice'; 4 | import useAppDispatch from 'hooks/use-app-dispatch'; 5 | import './404.css'; 6 | 7 | const Error404: React.FC = () => { 8 | const dispatch = useAppDispatch(); 9 | 10 | return ( 11 | <> 12 |
13 |
14 |
15 |
16 |
17 |
18 |

404

19 |

20 | Looks like the page you were looking for is no longer here. 21 |
22 |
23 | dispatch(setSelectedIndex(0))}> 24 | Please go to home! 25 | 26 |

27 |
28 |
29 |
30 | 31 | 32 | 36 | 37 | 38 | 45 | 46 | 47 | 51 | 53 | 54 | 55 | 60 | 65 | 66 | 67 | 72 | 74 | 75 | 76 | 78 | 79 | 80 | 81 | 82 | 87 | 88 | 89 |
90 |
91 | 92 | ); 93 | }; 94 | 95 | export default Error404; 96 | -------------------------------------------------------------------------------- /src/containers/add-funds/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { BsCurrencyBitcoin } from 'react-icons/bs'; 3 | import { AiOutlinePlus } from 'react-icons/ai'; 4 | import { FaEthereum, FaHandHoldingUsd, FaBitcoin } from 'react-icons/fa'; 5 | import { SiLitecoin } from 'react-icons/si'; 6 | import { GiMoneyStack } from 'react-icons/gi'; 7 | import XMRIcon from 'assets/icons/xmr.svg'; 8 | import XRPIcon from 'assets/icons/xrp.svg'; 9 | import TetherIcon from 'assets/icons/tether.png'; 10 | import { StyledDepositHistory, CardSection, HighlightCard, TopSection, CenterSection, BottomSection } from './styled'; 11 | 12 | const AddFunds: React.FC = () => { 13 | return ( 14 | 15 | 16 | 17 | 18 | 19 | Bitcoin 20 | 21 | 22 | 23 | Any amount is acceptable 24 | 25 | 26 | 27 | Add Balance Using Bitcoin Currency 28 | 29 | 30 | 31 | 32 | 33 | Ether 34 | 35 | 36 | 37 | Any amount is acceptable 38 | 39 | 40 | 41 | Add Balance Using Ethereum Currency 42 | 43 | 44 | 45 | 46 | 47 | Lite Coin 48 | 49 | 50 | 51 | Any amount is acceptable 52 | 53 | 54 | 55 | Add Balance Using Lite Coin Currency 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | Bitcoin Cash 64 | 65 | 66 | 67 | Any amount is acceptable 68 | 69 | 70 | 71 | Add Balance Using Bitcoin Cash Currency 72 | 73 | 74 | 75 | 76 | xmr 77 | XMR 78 | 79 | 80 | xmr 81 | Any amount is acceptable 82 | 83 | 84 | 85 | Add Balance Using XMR Currency 86 | 87 | 88 | 89 | 90 | xmr 91 | XRP 92 | 93 | 94 | xrp 95 | Any amount is acceptable 96 | 97 | 98 | 99 | Add Balance Using XRP Currency 100 | 101 | 102 | 103 | 104 | 105 | 106 | xmr 107 | Tether 108 | 109 | 110 | xrp 111 | Any amount is acceptable 112 | 113 | 114 | 115 | Add Balance Using Tether Currency 116 | 117 | 118 | 119 | 120 | 121 | USD Tron/TRC-20 122 | 123 | 124 | 125 | Any amount is acceptable 126 | 127 | 128 | 129 | Add Balance Using USD Tron/TRC-20 130 | 131 | 132 | 133 | 134 | 135 | Perfect Money 136 | 137 | 138 | 139 | Min/Max is 20 USD/5000 USD 140 | 141 | 142 | 143 | Add Balance Using Perfect Money 144 | 145 | 146 | 147 | 148 | ); 149 | }; 150 | 151 | export default AddFunds; 152 | -------------------------------------------------------------------------------- /src/containers/add-funds/styled.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export const StyledDepositHistory = styled.div` 4 | display: flex; 5 | flex-direction: column; 6 | & > *:not(:first-child) { 7 | margin-top: 3vh; 8 | } 9 | align-items: center; 10 | `; 11 | 12 | export const CardSection = styled.div` 13 | display: flex; 14 | flex-direction: row; 15 | justify-content: space-between; 16 | width: 95%; 17 | `; 18 | 19 | interface Props { 20 | colors: any; 21 | } 22 | 23 | export const HighlightCard = styled.div` 24 | border-radius: 5px; 25 | box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 26 | color: white; 27 | display: flex; 28 | flex-direction: column; 29 | background: ${({ colors }) => { 30 | return `linear-gradient(65.4deg, ${colors[0]} 18.74%, ${colors[1]} 88.33%);`; 31 | }}; 32 | width: 23vw; 33 | padding: 15px 15px 15px 20px; 34 | transition: all 0.2s; 35 | :hover { 36 | transform: scale(1.05); 37 | } 38 | cursor: pointer; 39 | `; 40 | 41 | export const TopSection = styled.div` 42 | display: flex; 43 | flex-direction: row; 44 | justify-content: space-between; 45 | svg { 46 | font-size: 2em; 47 | margin-top: 3px; 48 | font-weight: 600; 49 | } 50 | span { 51 | font-size: 1.3em; 52 | } 53 | `; 54 | 55 | export const CenterSection = styled.div` 56 | display: flex; 57 | flex-direction: row; 58 | justify-content: flex-start; 59 | align-items: center; 60 | margin-top: 10px; 61 | 62 | svg { 63 | font-size: 1.2em; 64 | } 65 | span { 66 | margin-left: 5px; 67 | font-size: 1em; 68 | } 69 | `; 70 | 71 | export const BottomSection = styled.button` 72 | display: flex; 73 | flex-direction: row; 74 | justify-content: flex-start; 75 | align-items: center; 76 | margin-top: 10px; 77 | svg { 78 | font-size: 1em; 79 | } 80 | span { 81 | font-size: 0.9em; 82 | } 83 | cursor: pointer; 84 | border: none; 85 | background: rgb(174, 56, 73); 86 | color: white; 87 | padding: 5px 5px; 88 | box-shadow: 0px 0px 2px black, 0px 0px 2px black; 89 | 90 | transition: all 0.3s; 91 | :active { 92 | transform: scale(0.95); 93 | } 94 | `; 95 | -------------------------------------------------------------------------------- /src/containers/app/index.tsx: -------------------------------------------------------------------------------- 1 | import React, { Suspense, useEffect } from 'react'; 2 | import { BrowserRouter as Router, Route, Switch, Redirect } from 'react-router-dom'; 3 | import GlobalStyles from 'styles/global'; 4 | import routes, { RouteType } from 'app/routes'; 5 | import Toastr from 'components/toastr'; 6 | import Loading from 'components/loading'; 7 | import { selectIsAuthenticated } from 'features/auth-slice'; 8 | import useAppSelector from 'hooks/use-app-seletecor'; 9 | import authApi from 'common/api/auth'; 10 | import { setCurrentUser } from 'features/auth-slice'; 11 | import useAppDispatch from 'hooks/use-app-dispatch'; 12 | 13 | const Error404 = React.lazy(() => import('containers/404')); 14 | 15 | const App: React.FC = () => { 16 | const isAuthenticated = useAppSelector(selectIsAuthenticated); 17 | const dispatch = useAppDispatch(); 18 | 19 | useEffect(() => { 20 | if (!authApi.isAuthenticated()) { 21 | dispatch(setCurrentUser({})); 22 | authApi.logout(); 23 | } 24 | }, [dispatch]); 25 | 26 | return ( 27 | <> 28 | }> 29 | 30 | 31 | 32 | 33 | {isAuthenticated ? : } 34 | 35 | {routes.map((route: RouteType, index: number) => { 36 | return ( 37 | 38 | 39 | 40 | 41 | 42 | ); 43 | })} 44 | 45 | 46 | 47 | 48 | 49 | 50 | ); 51 | }; 52 | 53 | export default App; 54 | -------------------------------------------------------------------------------- /src/containers/layout/auth-layout/footer/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { StyledFooter } from './styled'; 3 | 4 | const Footer: React.FC = () => { 5 | return ( 6 | 7 | Copyright © All rights reserved ♡ by SupremacySMS 8 | 9 | ); 10 | }; 11 | 12 | export default Footer; 13 | -------------------------------------------------------------------------------- /src/containers/layout/auth-layout/footer/styled.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | import theme from 'styles/theme'; 3 | 4 | export const StyledFooter = styled.footer` 5 | background-color: ${theme.color.background.midnight}; 6 | padding: 15px 55px; 7 | box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 8 | display: flex; 9 | width: 100%; 10 | justify-content: center; 11 | align-items: center; 12 | z-index: 1; 13 | 14 | span { 15 | font-size: 15px; 16 | color: ${theme.color.text.light}; 17 | } 18 | `; 19 | -------------------------------------------------------------------------------- /src/containers/layout/auth-layout/header/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Link } from 'react-router-dom'; 3 | import { StyledHeader, Logo, LogoTitle, Links } from './styled'; 4 | import logoImg from 'assets/icons/logo.png'; 5 | 6 | const Header: React.FC = () => { 7 | return ( 8 | 9 | 10 | 11 | logo 12 | Supremacy 13 | 14 | 15 | 16 | Sign In 17 | Sign Up 18 | 19 | 20 | ); 21 | }; 22 | 23 | export default Header; 24 | -------------------------------------------------------------------------------- /src/containers/layout/auth-layout/header/styled.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | import { heading } from 'styles/typography'; 3 | import theme from 'styles/theme'; 4 | 5 | export const StyledHeader = styled.header` 6 | background-color: ${theme.color.background.midnight}; 7 | padding: 15px 55px; 8 | box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 9 | position: fixed; 10 | top: 0; 11 | left: 0; 12 | width: 100vw; 13 | display: flex; 14 | justify-content: space-between; 15 | align-items: center; 16 | z-index: 1; 17 | `; 18 | 19 | export const Logo = styled.div` 20 | display: flex; 21 | flex-direction: row; 22 | align-items: center; 23 | cursor: pointer; 24 | `; 25 | 26 | export const LogoTitle = styled.h4` 27 | ${heading.h4.bold}; 28 | margin-left: 10px; 29 | color: white; 30 | `; 31 | 32 | export const Links = styled.div` 33 | display: flex; 34 | flex-direction: row; 35 | align-items: center; 36 | justify-content: space-between; 37 | 38 | & > * { 39 | padding: 0 15px; 40 | } 41 | & > *:not(:last-child) { 42 | border-right: 1px solid ${theme.color.text.light}; 43 | } 44 | 45 | a { 46 | position: relative; 47 | display: flex; 48 | flex-direction: column; 49 | font-weight: 500; 50 | color: white; 51 | ::after { 52 | transition: all 0.2s ease-in-out; 53 | content: ''; 54 | height: 2px; 55 | background-color: white; 56 | width: 100%; 57 | left: 0; 58 | bottom: -5px; 59 | transform: scaleX(0); 60 | } 61 | :hover { 62 | color: #c0c0c0; 63 | ::after { 64 | transform: scaleX(1); 65 | } 66 | } 67 | } 68 | `; 69 | -------------------------------------------------------------------------------- /src/containers/layout/auth-layout/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Header from './header'; 3 | import Footer from './footer'; 4 | import { AuthSection } from './styled'; 5 | 6 | interface Props { 7 | children: any; 8 | } 9 | 10 | const AuthLayout: React.FC = props => { 11 | const { children } = props; 12 | 13 | return ( 14 | <> 15 |
16 | {children} 17 |