Skip to content

Commit 98c0bef

Browse files
authored
Merge pull request #6 from karpolan/dev
Release 0.1.5
2 parents ea256b7 + c7760b6 commit 98c0bef

File tree

16 files changed

+79
-58
lines changed

16 files changed

+79
-58
lines changed

.env.sample

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,30 @@
1-
# Minimum level of visible Logs
1+
# Environment similar to NODE_ENV.
2+
# Analytics and public resources are enabled only in "production"
3+
# How to use: set value to "production" to get fully functional application.
4+
NEXT_PUBLIC_ENV = development
5+
# NEXT_PUBLIC_ENV = preview
6+
# NEXT_PUBLIC_ENV = production
7+
8+
# Enables additional debug features, no additional debug information if the variable is not set
9+
# How to use: set value to "true" to get more debugging information, but don't do it on production.
210
NEXT_PUBLIC_DEBUG = true
311

4-
# Minimum level of visible Logs
5-
NEXT_PUBLIC_LOG_LEVEL = DEBUG
6-
# NEXT_PUBLIC_LOG_LEVEL = ERROR
12+
# Public URL of the application/website.
13+
# How to use: Do not set any value until you need custom domain for your application.
14+
# NEXT_PUBLIC_PUBLIC_URL = https://xxx.com
15+
# NEXT_PUBLIC_PUBLIC_URL = https://xxx.web.app
16+
NEXT_PUBLIC_PUBLIC_URL = http://localhost:3000
17+
718

819
# API/Backend basic URL
9-
NEXT_PUBLIC_API_URL = http://localhost:3030
20+
NEXT_PUBLIC_API_URL = http://localhost:5000
1021
# NEXT_PUBLIC_API_URL = https://dev-api.domain.com
1122
# NEXT_PUBLIC_API_URL = https://api.domain.com
1223

13-
# Other settings
14-
NEXT_PUBLIC_GOOGLE_API_CLIENT_ID = _YOUR_CLIENT_ID_HERE_
24+
# EmailJS configuration for contact form
25+
NEXT_PUBLIC_EMAILJS_KEY = user-xxxx
26+
27+
# Analytics and Advertising
28+
NEXT_PUBLIC_GA_ID = G-...
29+
NEXT_PUBLIC_AMPLITUDE_API_KEY = 69abf7...
30+
NEXT_PUBLIC_ADSENSE_CLIENT_ID = pub-12345...

.eslintrc.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"extends": "next/core-web-vitals"
2+
"extends": "next/core-web-vitals",
3+
"rules": {
4+
"import/no-cycle": "error"
5+
}
36
}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nextjs-mui-starter-ts",
3-
"version": "0.1.3",
3+
"version": "0.1.5",
44
"description": "_DESCRIPTION_",
55
"author": {
66
"name": "Anton Karpenko",

src/components/AppIcon/AppIcon.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ import { ComponentType, FunctionComponent, SVGAttributes } from 'react';
22
import { APP_ICON_SIZE } from '../config';
33
import { IconName, ICONS } from './config';
44

5-
export interface AppIconProps extends SVGAttributes<SVGElement> {
5+
/**
6+
* Props of the AppIcon component, also can be used for SVG icons
7+
*/
8+
export interface Props extends SVGAttributes<SVGElement> {
69
color?: string;
710
icon?: IconName | string;
811
size?: string | number;
@@ -17,7 +20,7 @@ export interface AppIconProps extends SVGAttributes<SVGElement> {
1720
* @param {string} [title] - title/hint to show when the cursor hovers the icon
1821
* @param {string | number} [size] - size of the icon, default is ICON_SIZE
1922
*/
20-
const AppIcon: FunctionComponent<AppIconProps> = ({
23+
const AppIcon: FunctionComponent<Props> = ({
2124
color,
2225
icon = 'default',
2326
size = APP_ICON_SIZE,

src/components/AppIcon/icons/LogoIcon.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { FunctionComponent } from 'react';
2-
import { AppIconProps } from '../AppIcon';
2+
import { IconProps } from '../utils';
33

4-
const LogoIcon: FunctionComponent<AppIconProps> = (props) => {
4+
const LogoIcon: FunctionComponent<IconProps> = (props) => {
55
return (
66
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 36 36" {...props}>
77
<path

src/components/AppIcon/utils.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { SVGAttributes } from 'react';
2+
3+
/**
4+
* Props to use with custom SVG icons, similar to AppIcon's Props
5+
*/
6+
export interface IconProps extends SVGAttributes<SVGElement> {
7+
color?: string;
8+
icon?: string;
9+
size?: string | number;
10+
title?: string;
11+
}

src/components/AppIconButton/AppIconButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Tooltip, IconButton, IconButtonProps, TooltipProps } from '@mui/materia
33
import AppIcon from '../AppIcon';
44
import AppLink from '../AppLink';
55
import { alpha } from '@mui/material';
6-
import { AppIconProps } from '../AppIcon/AppIcon';
6+
import { Props } from '../AppIcon/AppIcon';
77
import { IconName } from '../AppIcon/config';
88

99
export const MUI_ICON_BUTTON_COLORS = [
@@ -20,7 +20,7 @@ export const MUI_ICON_BUTTON_COLORS = [
2020
export interface AppIconButtonProps extends Omit<IconButtonProps, 'color'> {
2121
color?: string; // Not only 'inherit' | 'default' | 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning',
2222
icon?: IconName | string;
23-
iconProps?: Partial<AppIconProps>;
23+
iconProps?: Partial<Props>;
2424
// Missing props
2525
component?: ElementType; // Could be RouterLink, AppLink, <a>, etc.
2626
to?: string; // Link prop

src/layout/BottomBar/BottomBar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React, { ChangeEvent, FunctionComponent, useCallback } from 'react';
22
import { BottomNavigation, BottomNavigationAction } from '@mui/material';
33
import { usePathname, useRouter } from 'next/navigation';
4-
import AppIcon from '../../components/AppIcon';
5-
import { LinkToPage } from '../../utils/type';
4+
import AppIcon from '@/components/AppIcon';
5+
import { LinkToPage } from '@/utils/type';
66

77
interface Props {
88
items: Array<LinkToPage>;

src/layout/SideBar/SideBar.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
'use client';
22
import { FunctionComponent, useCallback, MouseEvent } from 'react';
33
import { Stack, Divider, Drawer, DrawerProps, FormControlLabel, Switch, Tooltip } from '@mui/material';
4-
import { AppIconButton } from '../../components';
5-
import { useAppStore } from '../../store/AppStore';
6-
import { LinkToPage } from '../../utils/type';
7-
import { useEventLogout, useEventSwitchDarkMode, useOnMobile } from '../../hooks';
4+
import { AppIconButton } from '@/components';
5+
import { useAppStore } from '@/store/AppStore';
6+
import { LinkToPage } from '@/utils/type';
7+
import { useEventLogout, useEventSwitchDarkMode, useOnMobile } from '@/hooks';
88
import SideBarNavList from './SideBarNavList';
99
import { SIDEBAR_WIDTH, TOP_BAR_DESKTOP_HEIGHT } from '../config';
1010

0 commit comments

Comments
 (0)