Skip to content

Commit

Permalink
upd: dir structure (use src)
Browse files Browse the repository at this point in the history
  • Loading branch information
vikdiesel committed Dec 4, 2022
1 parent 4e3f5f8 commit c43e883
Show file tree
Hide file tree
Showing 77 changed files with 66 additions and 69 deletions.
2 changes: 1 addition & 1 deletion src/colors.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ColorButtonKey } from '../interfaces'
import type { ColorButtonKey } from './interfaces'

export const gradientBgBase = 'bg-gradient-to-tr'
export const gradientBgPurplePink = `${gradientBgBase} from-purple-400 via-pink-500 to-red-500`
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React, { useEffect, useState } from 'react'
import { mdiMinus, mdiPlus } from '@mdi/js'
import BaseIcon from './BaseIcon'
import Link from 'next/link'
import { getButtonColor } from '../src/colors'
import { getButtonColor } from '../colors'
import AsideMenuList from './AsideMenuList'
import { MenuAsideItem } from '../interfaces'
import { useAppSelector } from '../src/stores/hooks'
import { useAppSelector } from '../stores/hooks'
import { useRouter } from 'next/router'

type Props = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import BaseIcon from './BaseIcon'
import AsideMenuItem from './AsideMenuItem'
import AsideMenuList from './AsideMenuList'
import { MenuAsideItem } from '../interfaces'
import { useAppSelector } from '../src/stores/hooks'
import { useAppSelector } from '../stores/hooks'

type Props = {
menu: MenuAsideItem[]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import Link from 'next/link'
import { getButtonColor } from '../src/colors'
import { getButtonColor } from '../colors'
import BaseIcon from './BaseIcon'
import type { ColorButtonKey } from '../interfaces'

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { mdiCog } from '@mdi/js'
import React from 'react'
import { ColorKey, TrendType } from '../interfaces'
import { colorsText } from '../src/colors'
import { colorsText } from '../colors'
import BaseButton from './BaseButton'
import BaseIcon from './BaseIcon'
import CardBox from './CardBox'
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions components/FooterBar.tsx → src/components/FooterBar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { ReactNode } from 'react'
import { containerMaxW } from '../src/config'
import JustboilLogo from './justboil/Logo'
import { containerMaxW } from '../config'
import JustboilLogo from './JustboilLogo'

type Props = {
children: ReactNode
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import { ColorKey } from '../interfaces'
import { colorsBgLight, colorsText } from '../src/colors'
import { colorsBgLight, colorsText } from '../colors'
import BaseIcon from './BaseIcon'

type Props = {
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion components/NavBar.tsx → src/components/NavBar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { ReactNode, useState } from 'react'
import { mdiClose, mdiDotsVertical } from '@mdi/js'
import { containerMaxW } from '../src/config'
import { containerMaxW } from '../config'
import BaseIcon from './BaseIcon'
import NavBarItemPlain from './NavBarItemPlain'
import NavBarMenuList from './NavBarMenuList'
Expand Down
4 changes: 2 additions & 2 deletions components/NavBarItem.tsx → src/components/NavBarItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import BaseDivider from './BaseDivider'
import BaseIcon from './BaseIcon'
import UserAvatarCurrentUser from './UserAvatarCurrentUser'
import NavBarMenuList from './NavBarMenuList'
import { useAppDispatch, useAppSelector } from '../src/stores/hooks'
import { useAppDispatch, useAppSelector } from '../stores/hooks'
import { MenuNavBarItem } from '../interfaces'
import { setDarkMode } from '../src/stores/styleSlice'
import { setDarkMode } from '../stores/styleSlice'

type Props = {
item: MenuNavBarItem
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { ReactNode } from 'react'
import { useAppSelector } from '../src/stores/hooks'
import { useAppSelector } from '../stores/hooks'

type Props = {
display?: string
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { mdiClose } from '@mdi/js'
import React, { ReactNode, useState } from 'react'
import { ColorKey } from '../interfaces'
import { colorsBgLight, colorsOutline } from '../src/colors'
import { colorsBgLight, colorsOutline } from '../colors'
import BaseButton from './BaseButton'
import BaseIcon from './BaseIcon'

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { ReactNode } from 'react'
import { useAppSelector } from '../src/stores/hooks'
import { useAppSelector } from '../stores/hooks'

type Props = {
zIndex?: string
Expand Down
2 changes: 1 addition & 1 deletion components/PillTag.tsx → src/components/PillTag.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import { ColorKey } from '../interfaces'
import { colorsBgLight, colorsOutline } from '../src/colors'
import { colorsBgLight, colorsOutline } from '../colors'
import PillTagPlain from './PillTagPlain'

type Props = {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { mdiGithub } from '@mdi/js'
import React from 'react'
import { gradientBgPinkRed } from '../src/colors'
import { gradientBgPinkRed } from '../colors'
import BaseButton from './BaseButton'
import SectionBanner from './SectionBanner'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ReactNode } from 'react'
import { BgKey } from '../interfaces'
import { gradientBgPurplePink, gradientBgDark, gradientBgPinkRed } from '../src/colors'
import { useAppSelector } from '../src/stores/hooks'
import { gradientBgPurplePink, gradientBgDark, gradientBgPinkRed } from '../colors'
import { useAppSelector } from '../stores/hooks'

type Props = {
bg: BgKey
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { ReactNode } from 'react'
import { containerMaxW } from '../src/config'
import { containerMaxW } from '../config'

type Props = {
children: ReactNode
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { ReactNode } from 'react'
import { useAppSelector } from '../src/stores/hooks'
import { useAppSelector } from '../stores/hooks'
import UserAvatar from './UserAvatar'

type Props = {
Expand Down
2 changes: 1 addition & 1 deletion components/UserCard.tsx → src/components/UserCard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { mdiCheckDecagram } from '@mdi/js'
import { Field, Form, Formik } from 'formik'
import { useAppSelector } from '../src/stores/hooks'
import { useAppSelector } from '../stores/hooks'
import CardBox from './CardBox'
import FormCheckRadio from './FormCheckRadio'
import PillTag from './PillTag'
Expand Down
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export const containerMaxW = 'xl:max-w-6xl xl:mx-auto'

export const appTitle = 'Free Tailwind 3 React Next Typescript dashboard template'

export const getPageTitle = (currentPageTitle: string) => `${currentPageTitle}${appTitle}`
export const getPageTitle = (currentPageTitle: string) => `${currentPageTitle}${appTitle}`
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import React, { ReactNode, useEffect } from 'react'
import { useState } from 'react'
import { mdiForwardburger, mdiBackburger, mdiMenu } from '@mdi/js'
import menuAside from '../../src/menuAside'
import menuNavBar from '../../src/menuNavBar'
import BaseIcon from '../BaseIcon'
import NavBar from '../NavBar'
import NavBarItemPlain from '../NavBarItemPlain'
import AsideMenu from '../AsideMenu'
import FooterBar from '../FooterBar'
import { setUser } from '../../src/stores/mainSlice'
import { useAppDispatch, useAppSelector } from '../../src/stores/hooks'
import FormField from '../FormField'
import menuAside from '../menuAside'
import menuNavBar from '../menuNavBar'
import BaseIcon from '../components/BaseIcon'
import NavBar from '../components/NavBar'
import NavBarItemPlain from '../components/NavBarItemPlain'
import AsideMenu from '../components/AsideMenu'
import FooterBar from '../components/FooterBar'
import { setUser } from '../stores/mainSlice'
import { useAppDispatch, useAppSelector } from '../stores/hooks'
import FormField from '../components/FormField'
import { Field, Form, Formik } from 'formik'
import { useRouter } from 'next/router'

Expand Down
2 changes: 1 addition & 1 deletion components/layouts/Guest.tsx → src/layouts/Guest.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { ReactNode } from 'react'
import { useAppSelector } from '../../src/stores/hooks'
import { useAppSelector } from '../stores/hooks'

type Props = {
children: ReactNode
Expand Down
2 changes: 1 addition & 1 deletion src/menuAside.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
mdiPalette,
mdiVuejs,
} from '@mdi/js'
import { MenuAsideItem } from '../interfaces'
import { MenuAsideItem } from './interfaces'

const menuAside: MenuAsideItem[] = [
{
Expand Down
2 changes: 1 addition & 1 deletion src/menuNavBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
mdiGithub,
mdiVuejs,
} from '@mdi/js'
import { MenuNavBarItem } from '../interfaces'
import { MenuNavBarItem } from './interfaces'

const menuNavBar: MenuNavBarItem[] = [
{
Expand Down
4 changes: 2 additions & 2 deletions pages/_app.tsx → src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import type { AppProps } from 'next/app'
import type { ReactElement, ReactNode } from 'react'
import type { NextPage } from 'next'
import Head from 'next/head'
import { store } from '../src/stores/store'
import { store } from '../stores/store'
import { Provider } from 'react-redux'
import '../styles/main.css'
import '../css/main.css'

export type NextPageWithLayout<P = Record<string, unknown>, IP = P> = NextPage<P, IP> & {
getLayout?: (page: ReactElement) => ReactNode
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions pages/dashboard.tsx → src/pages/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Head from 'next/head'
import React, { useState } from 'react'
import type { ReactElement } from 'react'
import BaseButton from '../components/BaseButton'
import LayoutAuthenticated from '../components/layouts/Authenticated'
import LayoutAuthenticated from '../layouts/Authenticated'
import SectionMain from '../components/SectionMain'
import SectionTitleLineWithButton from '../components/SectionTitleLineWithButton'
import CardBoxWidget from '../components/CardBoxWidget'
Expand All @@ -21,11 +21,11 @@ import { Client, Transaction } from '../interfaces'
import CardBoxClient from '../components/CardBoxClient'
import SectionBannerStarOnGitHub from '../components/SectionBannerStarOnGitHub'
import CardBox from '../components/CardBox'
import { sampleChartData } from '../components/charts/config'
import ChartLineSample from '../components/charts/LineSample'
import { sampleChartData } from '../components/ChartLineSample/config'
import ChartLineSample from '../components/ChartLineSample'
import NotificationBar from '../components/NotificationBar'
import TableSampleClients from '../components/TableSampleClients'
import { getPageTitle } from '../src/config'
import { getPageTitle } from '../config'

const Dashboard = () => {
const { clients } = useSampleClients()
Expand Down
4 changes: 2 additions & 2 deletions pages/error.tsx → src/pages/error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import Head from 'next/head'
import BaseButton from '../components/BaseButton'
import CardBox from '../components/CardBox'
import SectionFullScreen from '../components/SectionFullScreen'
import LayoutGuest from '../components/layouts/Guest'
import { getPageTitle } from '../src/config'
import LayoutGuest from '../layouts/Guest'
import { getPageTitle } from '../config'

export default function Error() {
return (
Expand Down
4 changes: 2 additions & 2 deletions pages/forms.tsx → src/pages/forms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import FormCheckRadio from '../components/FormCheckRadio'
import FormCheckRadioGroup from '../components/FormCheckRadioGroup'
import FormField from '../components/FormField'
import FormFilePicker from '../components/FormFilePicker'
import LayoutAuthenticated from '../components/layouts/Authenticated'
import LayoutAuthenticated from '../layouts/Authenticated'
import SectionMain from '../components/SectionMain'
import SectionTitle from '../components/SectionTitle'
import SectionTitleLineWithButton from '../components/SectionTitleLineWithButton'
import { getPageTitle } from '../src/config'
import { getPageTitle } from '../config'

const FormsPage = () => {
return (
Expand Down
10 changes: 5 additions & 5 deletions pages/index.tsx → src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import Image from 'next/image'
import { useRouter } from 'next/router'
import React, { ReactElement } from 'react'
import CardBox from '../components/CardBox'
import LayoutGuest from '../components/layouts/Guest'
import LayoutGuest from '../layouts/Guest'
import SectionMain from '../components/SectionMain'
import { StyleKey } from '../interfaces'
import { gradientBgPurplePink } from '../src/colors'
import { appTitle } from '../src/config'
import { useAppDispatch } from '../src/stores/hooks'
import { setDarkMode, setStyle } from '../src/stores/styleSlice'
import { gradientBgPurplePink } from '../colors'
import { appTitle } from '../config'
import { useAppDispatch } from '../stores/hooks'
import { setDarkMode, setStyle } from '../stores/styleSlice'

const StyleSelect = () => {
const dispatch = useAppDispatch()
Expand Down
4 changes: 2 additions & 2 deletions pages/login.tsx → src/pages/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import Head from 'next/head'
import BaseButton from '../components/BaseButton'
import CardBox from '../components/CardBox'
import SectionFullScreen from '../components/SectionFullScreen'
import LayoutGuest from '../components/layouts/Guest'
import LayoutGuest from '../layouts/Guest'
import { Field, Form, Formik } from 'formik'
import FormField from '../components/FormField'
import FormCheckRadio from '../components/FormCheckRadio'
import BaseDivider from '../components/BaseDivider'
import BaseButtons from '../components/BaseButtons'
import { useRouter } from 'next/router'
import { getPageTitle } from '../src/config'
import { getPageTitle } from '../config'

export default function Error() {
const router = useRouter()
Expand Down
6 changes: 3 additions & 3 deletions pages/profile.tsx → src/pages/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ import CardBoxComponentBody from '../components/CardBoxComponentBody'
import CardBoxComponentFooter from '../components/CardBoxComponentFooter'
import FormField from '../components/FormField'
import FormFilePicker from '../components/FormFilePicker'
import LayoutAuthenticated from '../components/layouts/Authenticated'
import LayoutAuthenticated from '../layouts/Authenticated'
import SectionMain from '../components/SectionMain'
import SectionTitleLineWithButton from '../components/SectionTitleLineWithButton'
import UserCard from '../components/UserCard'
import type { UserForm } from '../interfaces'
import { getPageTitle } from '../src/config'
import { useAppSelector } from '../src/stores/hooks'
import { getPageTitle } from '../config'
import { useAppSelector } from '../stores/hooks'

const ProfilePage = () => {
const userName = useAppSelector((state) => state.main.userName)
Expand Down
4 changes: 2 additions & 2 deletions pages/responsive.tsx → src/pages/responsive.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Head from 'next/head'
import Image from 'next/image'
import React, { ReactElement } from 'react'
import LayoutAuthenticated from '../components/layouts/Authenticated'
import LayoutAuthenticated from '../layouts/Authenticated'
import SectionMain from '../components/SectionMain'
import SectionTitle from '../components/SectionTitle'
import { appTitle, getPageTitle } from '../src/config'
import { appTitle, getPageTitle } from '../config'

const ResponsivePage = () => {
return (
Expand Down
4 changes: 2 additions & 2 deletions pages/tables.tsx → src/pages/tables.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import React, { ReactElement } from 'react'
import BaseButton from '../components/BaseButton'
import CardBox from '../components/CardBox'
import CardBoxComponentEmpty from '../components/CardBoxComponentEmpty'
import LayoutAuthenticated from '../components/layouts/Authenticated'
import LayoutAuthenticated from '../layouts/Authenticated'
import NotificationBar from '../components/NotificationBar'
import SectionMain from '../components/SectionMain'
import SectionTitleLineWithButton from '../components/SectionTitleLineWithButton'
import TableSampleClients from '../components/TableSampleClients'
import { getPageTitle } from '../src/config'
import { getPageTitle } from '../config'

const TablesPage = () => {
return (
Expand Down
8 changes: 4 additions & 4 deletions pages/ui.tsx → src/pages/ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ import CardBoxComponentTitle from '../components/CardBoxComponentTitle'
import CardBoxModal from '../components/CardBoxModal'
import FormCheckRadio from '../components/FormCheckRadio'
import FormCheckRadioGroup from '../components/FormCheckRadioGroup'
import LayoutAuthenticated from '../components/layouts/Authenticated'
import LayoutAuthenticated from '../layouts/Authenticated'
import NotificationBar from '../components/NotificationBar'
import PillTag from '../components/PillTag'
import SectionMain from '../components/SectionMain'
import SectionTitle from '../components/SectionTitle'
import SectionTitleLineWithButton from '../components/SectionTitleLineWithButton'
import { useAppDispatch } from '../src/stores/hooks'
import { setDarkMode } from '../src/stores/styleSlice'
import { getPageTitle } from '../src/config'
import { useAppDispatch } from '../stores/hooks'
import { setDarkMode } from '../stores/styleSlice'
import { getPageTitle } from '../config'

const UiPage = () => {
const dispatch = useAppDispatch()
Expand Down
2 changes: 1 addition & 1 deletion src/stores/mainSlice.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createSlice, PayloadAction } from '@reduxjs/toolkit'
import { UserPayloadObject } from '../../interfaces'
import { UserPayloadObject } from '../interfaces'

interface MainState {
userName: string
Expand Down
2 changes: 1 addition & 1 deletion src/stores/styleSlice.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createSlice, PayloadAction } from '@reduxjs/toolkit'
import * as styles from '../styles'
import { localStorageDarkModeKey, localStorageStyleKey } from '../config'
import { StyleKey } from '../../interfaces'
import { StyleKey } from '../interfaces'

interface StyleState {
asideStyle: string
Expand Down
3 changes: 0 additions & 3 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ const plugin = require('tailwindcss/plugin')

module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
'./components/**/*.{js,ts,jsx,tsx}',
'./layouts/**/*.{js,ts,jsx,tsx}',
'./src/**/*.{js,ts,jsx,tsx}',
],
darkMode: 'class', // or 'media' or 'class'
Expand Down

0 comments on commit c43e883

Please sign in to comment.