Skip to content

Commit

Permalink
refactor: change project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
kemilbeltre committed Feb 4, 2024
1 parent 0a421f8 commit 68835b6
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Metadata } from 'next'

import { BaseLayout } from '@core/layouts'
import { BaseLayout } from '../layouts'

import './globals.css'

Expand Down
8 changes: 0 additions & 8 deletions src/core/constants/index.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/core/providers/theme-provider/types.ts

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Popover, Dialog } from '@headlessui/react'
import { Bars3Icon, XMarkIcon } from '@heroicons/react/24/outline'
import classnames from 'classnames'

import { Urls } from '@core/constants'
import { WIKI, NEWSLETTER, BLOG, GITHUB } from './constants'

import styles from './styles.module.css'
import { ThemeSelect, ThemeToggle } from './theme'
Expand Down Expand Up @@ -46,13 +46,13 @@ export default function Header() {
<Link
target="_blank"
rel="noopener"
href={Urls.WIKI}
href={WIKI}
className={styles.link}
>
Wiki
</Link>
<Link
href={Urls.NEWSLETTER}
href={NEWSLETTER}
target="_blank"
rel="noopener"
className={styles.link}
Expand All @@ -62,7 +62,7 @@ export default function Header() {
<Link
target="_blank"
rel="noopener"
href={Urls.BLOG}
href={BLOG}
className={styles.link}
>
Blog
Expand All @@ -74,7 +74,7 @@ export default function Header() {
<Link
target="_blank"
rel="noopener"
href={Urls.GITHUB}
href={GITHUB}
className={styles.link}
>
<span className="sr-only">Frontend Garage on GitHub</span>
Expand Down Expand Up @@ -133,15 +133,15 @@ export default function Header() {
<Link
target="_blank"
rel="noopener"
href={Urls.WIKI}
href={WIKI}
className={styles.mobileLink}
>
Wiki
</Link>
<Link
target="_blank"
rel="noopener"
href={Urls.NEWSLETTER}
href={NEWSLETTER}
className={styles.mobileLink}
>
Newsletter
Expand All @@ -150,7 +150,7 @@ export default function Header() {
<Link
target="_blank"
rel="noopener"
href={Urls.BLOG}
href={BLOG}
className={styles.mobileLink}
>
Blog
Expand All @@ -160,7 +160,7 @@ export default function Header() {
<Link
target="_blank"
rel="noopener"
href={Urls.GITHUB}
href={GITHUB}
className={styles.mobileLink}
>
GitHub
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client'
import { Inter } from 'next/font/google'

import { ThemeProvider } from '@core/providers'
import { ThemeProvider } from 'src/providers'

import Header from './header'
import Footer from './footer'
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
'use client'

import { useEffect, useState } from 'react'
import type { ComponentProps } from 'react'
import { ThemeProvider as NextThemeProvider } from 'next-themes'

import type { ThemeProviderProperties } from './types'

export default function ThemeProvider({ children }: ThemeProviderProperties) {
export default function ThemeProvider({ children }: ComponentProps<'div'>) {
const [mounted, setMounted] = useState<boolean>(false)

useEffect(() => {
Expand Down
3 changes: 2 additions & 1 deletion tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ const config: Config = {
content: [
'./src/pages/**/*.{js,ts,jsx,tsx,mdx}',
'./src/app/**/*.{js,ts,jsx,tsx,mdx}',
'./src/core/**/*.{js,ts,jsx,tsx,mdx}',
'./src/layouts/**/*.{js,ts,jsx,tsx,mdx}',
'./src/providers/**/*.{js,ts,jsx,tsx,mdx}',
],
theme: {
extend: {
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
}
],
"paths": {
"@core/*": ["./src/core/*"],
"@features/*": ["./src/features/*"]
"src/*": ["./src/*"]
}
},
"include": [
Expand Down

0 comments on commit 68835b6

Please sign in to comment.