Skip to content

Commit

Permalink
Merge pull request #28 from frankduandou/20240618_small-updates-on-UI
Browse files Browse the repository at this point in the history
toast update in layout, post action icon
  • Loading branch information
keyskull authored Jun 18, 2024
2 parents 8282677 + f832a6f commit 6a52374
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion app/(root)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { SpeedInsights } from "@vercel/speed-insights/next"
import { NextUIProvider } from '@nextui-org/react';
import { ThemeProvider as NextThemesProvider } from "next-themes";
import Frame from '@mitech/shared-components/component/frame-with-sidebar-and-navbar';
import { NotificationProvider } from '@/components/ui/NotificationContext';
export const metadata = {
title: 'Welcome to Mitech Recruitment',
description:
Expand All @@ -26,7 +27,7 @@ export default async function RootLayout({
<NextThemesProvider attribute="class" defaultTheme='light'>
<main className="text-foreground bg-background">
<Frame>
{children}
<NotificationProvider>{children}</NotificationProvider>
</Frame>
</main>
<Analytics />
Expand Down
4 changes: 2 additions & 2 deletions components/ui/ads-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export default function AdsTable({
</td>
<td className="whitespace-nowrap py-3 pl-2 pr-2 w-0.5">
<div className="flex gap-3">
{ad.id && <UpdateAd id={ad.id} />}
{ad.status !== "published" && ad.id && <UpdateAd id={ad.id} />}
</div>
</td>
<td className="whitespace-nowrap py-3 pl-2 pr-2 w-0.5">
Expand All @@ -145,7 +145,7 @@ export default function AdsTable({
</td>
<td className="whitespace-nowrap py-3 pl-2 pr-2 w-0.5">
<div className="flex gap-3">
{ad.id &&<DeleteAd id={ad.id} />}
{ad.status !== "published" && ad.id &&<DeleteAd id={ad.id} />}
</div>
</td>
</tr>
Expand Down
4 changes: 2 additions & 2 deletions components/ui/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import React from 'react';
import Link from 'next/link';
import { PlusIcon, PencilIcon, StopIcon, ArrowUpOnSquareIcon, EyeIcon, TrashIcon } from '@heroicons/react/24/outline';
import { PlusIcon, PencilIcon, StopIcon, EyeIcon, TrashIcon, ArrowUpOnSquareStackIcon } from '@heroicons/react/24/outline';
import {Tooltip, Modal, ModalContent, ModalHeader, ModalBody, ModalFooter, Button, useDisclosure} from "@nextui-org/react";
import { redirect, useRouter } from 'next/navigation';
import { deleteAd, publishAd, unpublishAd } from '@/lib/api';
Expand Down Expand Up @@ -110,7 +110,7 @@ export function PostAd({ id }: { id: string }) {
<Tooltip content={"Post"} offset={-4}>
<Button className="rounded-md border p-2 hover:bg-gray-100 min-w-0" onPress={onOpen}>
<span className="sr-only">Post</span>
<ArrowUpOnSquareIcon className="w-4" />
<ArrowUpOnSquareStackIcon className="w-4" />
</Button>
</Tooltip>
<Modal isOpen={isOpen} onOpenChange={onOpenChange} placement='top' classNames={{base:"bg-white"}}>
Expand Down

0 comments on commit 6a52374

Please sign in to comment.