Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ jobs:
- name: Use Node.js 24
uses: actions/setup-node@v4
with:
node-version: '24'
node-version: "24"

- name: 🔨 Build Project
run: |
cd vite
corepack enable
yarn set version 4.12.0
yarn set version 4.14.1
yarn
yarn build

Expand All @@ -39,9 +40,9 @@ jobs:
env:
SSH_PRIVATE_KEY: ${{ secrets.SERVER_SSH_KEY }}
# ARGS: "-rltgoDzvO --delete"
SOURCE: 'dist/'
SOURCE: "dist/"
REMOTE_HOST: 145.79.3.173
REMOTE_USER: u965251139
REMOTE_PORT: "65002"
TARGET: domains/mantisdashboard.com/public_html/free
EXCLUDE: '/build/, /node_modules/'
EXCLUDE: "/build/, /node_modules/"
105 changes: 58 additions & 47 deletions README.md

Large diffs are not rendered by default.

48 changes: 0 additions & 48 deletions index.html

This file was deleted.

39 changes: 39 additions & 0 deletions next/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.yarn*

# local env files
.env*.local


# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

!package-lock.json
2 changes: 2 additions & 0 deletions next/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.next
node_modules
File renamed without changes.
89 changes: 89 additions & 0 deletions next/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
import { fixupConfigRules } from '@eslint/compat';
import prettier from 'eslint-plugin-prettier';
import react from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import jsxA11y from 'eslint-plugin-jsx-a11y';
import js from '@eslint/js';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { FlatCompat } from '@eslint/eslintrc';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [
...fixupConfigRules(compat.extends('prettier')),

{
plugins: {
prettier,
react,
'react-hooks': reactHooks,
'jsx-a11y': jsxA11y
},

languageOptions: {
ecmaVersion: 2020,
sourceType: 'module',
parserOptions: {
ecmaFeatures: {
jsx: true
}
}
},

settings: {
react: {
version: 'detect'
}
},

rules: {
'react/jsx-filename-extension': 'off',
'no-param-reassign': 'off',
'react/prop-types': 'off',
'react/require-default-props': 'off',
'react/no-array-index-key': 'off',
'react/react-in-jsx-scope': 'off',
'react/jsx-props-no-spreading': 'off',
'import/order': 'off',
'no-console': 'off',
'no-shadow': 'off',
'import/no-cycle': 'off',
'import/no-extraneous-dependencies': 'off',
'jsx-a11y/label-has-associated-control': 'off',
'jsx-a11y/no-autofocus': 'off',
'react/jsx-uses-react': 'off',
'react/jsx-uses-vars': 'error',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'no-unused-vars': 'off',

'no-restricted-imports': [
'error',
{
patterns: ['@mui/*/*/*', '!@mui/material/test-utils/*']
}
],

'no-unused-vars': [
'error',
{
vars: 'all',
args: 'none'
}
],

'prettier/prettier': 'warn'
}
},
{
ignores: ['node_modules/**'],
files: ['src/**/*.{js,jsx}']
}
];
34 changes: 34 additions & 0 deletions next/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
"incremental": true,
"baseUrl": "src",
"downlevelIteration": true,
"allowSyntheticDefaultImports": true,
"noUnusedLocals": true,
"noImplicitAny": true,
"noFallthroughCasesInSwitch": true,
"noImplicitThis": true,
"strictNullChecks": true,
"typeRoots": ["../node_modules/@types", "../@types", "./types"],
"plugins": [
{
"name": "next"
}
]
},
"include": ["next-env.d.js", "**/*.js", "**/*.jsx", ".next/types/**/*.js", ".next/dev/types/**/*.js"],
"exclude": ["node_modules"]
}
22 changes: 22 additions & 0 deletions next/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/** @type {import('next').NextConfig} */
const path = require('path');

const nextConfig = {
modularizeImports: {
'@mui/material': {
transform: '@mui/material/{{member}}'
}
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'flagcdn.com',
pathname: '**'
}
]
},
outputFileTracingRoot: path.join(__dirname, './')
};

module.exports = nextConfig;
64 changes: 64 additions & 0 deletions next/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"name": "mantis-material-next-js",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
"lint:fix": "eslint --fix \"src/**/*.{js,jsx,ts,tsx}\"",
"prettier": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\""
},
"dependencies": {
"@ant-design/colors": "8.0.1",
"@ant-design/icons": "6.2.3",
"@emotion/cache": "11.14.0",
"@emotion/react": "11.14.0",
"@emotion/styled": "11.14.1",
"@fontsource/inter": "5.2.8",
"@fontsource/poppins": "5.2.7",
"@fontsource/public-sans": "5.2.7",
"@fontsource/roboto": "5.2.10",
"@mui/lab": "9.0.0-beta.3",
"@mui/material": "7.3.9",
"@mui/material-nextjs": "9.0.1",
"@mui/system": "7.3.9",
"@mui/utils": "9.0.1",
"@mui/x-charts": "9.2.0",
"@mui/x-date-pickers": "9.2.0",
"apexcharts": "5.10.4",
"formik": "2.4.9",
"framer-motion": "12.36.0",
"lodash": "4.18.1",
"next": "16.1.6",
"prop-types": "15.8.1",
"react": "19.2.4",
"react-apexcharts": "2.1.0",
"react-copy-to-clipboard": "5.1.1",
"react-device-detect": "2.2.3",
"react-dom": "19.2.4",
"react-number-format": "5.4.5",
"simplebar-react": "3.3.2",
"styled-jsx": "5.1.7",
"swr": "2.4.1",
"yup": "1.7.1"
},
"devDependencies": {
"@eslint/compat": "2.0.3",
"@eslint/eslintrc": "3.3.5",
"@eslint/js": "10.0.1",
"eslint": "10.1.0",
"eslint-config-next": "16.1.6",
"eslint-config-prettier": "10.1.8",
"eslint-plugin-jsx-a11y": "6.10.2",
"eslint-plugin-prettier": "5.5.5",
"eslint-plugin-react": "7.37.5",
"eslint-plugin-react-hooks": "7.0.1",
"prettier": "3.8.1"
},
"overrides": {
"eslint": "10.1.0"
},
"packageManager": "yarn@4.13.0"
}
Binary file not shown.
Binary file not shown.
17 changes: 17 additions & 0 deletions next/public/assets/fonts/inter/inter.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@font-face {
font-family: 'Inter var';
font-weight: 100 900;
font-display: swap;
font-style: normal;
font-named-instance: 'Regular';
src: url('Inter-roman.var.woff2?v=3.18') format('woff2');
}

@font-face {
font-family: 'Inter var';
font-weight: 100 900;
font-display: swap;
font-style: italic;
font-named-instance: 'Italic';
src: url('Inter-italic.var.woff2?v=3.18') format('woff2');
}
Binary file added next/public/assets/images/users/avatar-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
45 changes: 45 additions & 0 deletions next/src/api/menu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
'use client';

import useSWR, { mutate } from 'swr';
import { useMemo } from 'react';

const initialState = {
isDashboardDrawerOpened: false
};

const endpoints = {
key: 'api/menu',
master: 'master',
dashboard: '/dashboard' // server URL
};

export function useGetMenuMaster() {
const { data, isLoading } = useSWR(endpoints.key + endpoints.master, () => initialState, {
fallbackData: initialState,
revalidateIfStale: false,
revalidateOnFocus: false,
revalidateOnReconnect: false
});

const memoizedValue = useMemo(
() => ({
menuMaster: data || initialState,
menuMasterLoading: isLoading
}),
[data, isLoading]
);

return memoizedValue;
}

export function handlerDrawerOpen(isDashboardDrawerOpened) {
// to update local state based on key

mutate(
endpoints.key + endpoints.master,
(currentMenuMaster) => {
return { ...currentMenuMaster, isDashboardDrawerOpened };
},
false
);
}
Loading
Loading