Skip to content

Commit

Permalink
🎨 change structure a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
MammaSonnim committed Aug 13, 2024
1 parent 3083df3 commit 7fa9834
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ Based on [Next.js App Router Course](https://nextjs.org/learn), but I also imple
- Playwright
- Linting/Prettier + Husky + lint-staged
- Github actions

### Authentication

email: [email protected]
password: 123456
2 changes: 1 addition & 1 deletion app/dashboard/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import SideNav from '@/app/ui/dashboard/sidenav';
import { NotificationProvider } from '@/app/ui/notification-context';
import { NotificationProvider } from '@/app/ui/providers/notification';
import Notification from '@/app/ui/notification';

export default function Layout({ children }: { children: React.ReactNode }) {
Expand Down
2 changes: 1 addition & 1 deletion app/ui/invoices/buttons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Link from 'next/link';
import { useEffect, useActionState } from 'react';
import { PencilIcon, PlusIcon, TrashIcon } from '@heroicons/react/24/outline';
import { deleteInvoice } from '@/app/lib/actions';
import { useNotification } from '../notification-context';
import { useNotification } from '@/app/ui/providers/notification';

export function CreateInvoice() {
return (
Expand Down
4 changes: 2 additions & 2 deletions app/ui/invoices/create-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import {
UserCircleIcon,
} from '@heroicons/react/24/outline';
import { CustomerField } from '@/app/lib/definitions';
import { Button } from '@/app/ui/button';
import { createInvoice } from '@/app/lib/actions';
import { useNotification } from '../notification-context';
import { Button } from '@/app/ui/button';
import { useNotification } from '@/app/ui/providers/notification';

export default function Form({ customers }: { customers: CustomerField[] }) {
const [state, formAction, isPending] = useActionState(createInvoice, {
Expand Down
4 changes: 2 additions & 2 deletions app/ui/invoices/edit-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import {
CurrencyDollarIcon,
UserCircleIcon,
} from '@heroicons/react/24/outline';
import { Button } from '@/app/ui/button';
import { updateInvoice } from '@/app/lib/actions';
import { useNotification } from '../notification-context';
import { Button } from '@/app/ui/button';
import { useNotification } from '@/app/ui/providers/notification';

export default function EditInvoiceForm({
invoice,
Expand Down
2 changes: 1 addition & 1 deletion app/ui/notification.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import React from 'react';
import { useNotification } from './notification-context';
import { useNotification } from './providers/notification';

export default function Notification() {
const { message, setMessage } = useNotification();
Expand Down
File renamed without changes.

0 comments on commit 7fa9834

Please sign in to comment.