Skip to content

Commit

Permalink
[REFACTOR] removed unnecessary imports and fix issues on sonarcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
nataniadeandra committed May 26, 2024
1 parent 150ec13 commit a9dda87
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion __tests__/event/event.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ describe('Test for event page', () => {

fireEvent.submit(getByTestId('purpose-form'))
})

it('test if createEvetData is null', async () => {
const myInitialState = dayjs('2022-12-12')

Expand Down
3 changes: 0 additions & 3 deletions __tests__/rundown/create-rundown-manual.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import '@testing-library/jest-dom'
import React from 'react'
import { render, fireEvent, waitFor } from '@testing-library/react'

import { Provider } from 'react-redux'
import { store } from '@/redux/store'

import {
useCreateRundownManuallyMutation,
useCreateRundownWithAIMutation,
Expand All @@ -13,7 +11,6 @@ import {
useGetEventRundownQuery,
} from '@/redux/api/rundownApi'
import { toast } from 'react-hot-toast'

import { redirect, useParams, usePathname } from 'next/navigation'
import { CreateRundownManualForm } from '@/app/event/[eventId]/(eventId)/rundown/CreateRundownManualForm'
import CreateRundownPage from '@/app/event/[eventId]/(eventId)/create-rundown/page'
Expand Down
2 changes: 1 addition & 1 deletion __tests__/rundown/free-rundown-ai-button.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { render, screen } from '@testing-library/react'
import '@testing-library/jest-dom'
import { Provider as ReduxProvider } from 'react-redux'
import { store } from '@/redux/store'
import { redirect, useParams, usePathname } from 'next/navigation'
import { useParams } from 'next/navigation'
import { CreateRundownButton } from '@/app/event/[eventId]/(eventId)/rundown/CreateRundownButton'

jest.mock('next/navigation', () => ({
Expand Down
2 changes: 1 addition & 1 deletion __tests__/rundown/premium-rundown-ai-button.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { render, screen } from '@testing-library/react'
import '@testing-library/jest-dom'
import { Provider as ReduxProvider } from 'react-redux'
import { store } from '@/redux/store'
import { redirect, useParams, usePathname } from 'next/navigation'
import { useParams } from 'next/navigation'
import { CreateRundownButton } from '@/app/event/[eventId]/(eventId)/rundown/CreateRundownButton'

jest.mock('next/navigation', () => ({
Expand Down
4 changes: 1 addition & 3 deletions src/app/dashboard/TransactionHistory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ export const TransactionHistory = ({ status }: TransactionHistoryI) => {
{formatDateTime(checkout_time)}
</td>

<td className="p-2 border-2 border-teal-600">
{name}
</td>
<td className="p-2 border-2 border-teal-600">{name}</td>
<td className="p-2 border-2 border-teal-600">
{formatRupiah(price)}
</td>
Expand Down
2 changes: 1 addition & 1 deletion src/app/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ export default function Profile() {
</Box>
))
) : (
<p className='text-center w-full'>No events found.</p>
<p className="text-center w-full">No events found.</p>
)}
</Box>
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ export const CreateRundownButton = () => {
data-testid="free-rundown-ai-button"
style={{ backgroundColor: 'gray', color: 'white' }}
>
<p className="whitespace-nowrap w-full flex">
<p className="whitespace-nowrap w-full flex items-center">
<i className="i-ph-lock-key-light text-white size-6 mr-2" />
Generate with AI
<span>Generate with AI</span>
</p>
</Button>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const AddTaskStepsButton = () => {
>
<p className="whitespace-nowrap w-full flex">
<i className="i-ph-lock-key-light text-white size-6 mr-2" />
Generate with AI
<span>Generate with AI</span>
</p>
</Button>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/app/plans/AISuggestion/AIButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const AIButton = () => {
>
<p className="whitespace-nowrap w-full flex">
<i className="i-ph-lock-key-light text-white size-6 mr-2" />
Ask AI
<span>Ask AI</span>
</p>
</Button>
)}
Expand Down

0 comments on commit a9dda87

Please sign in to comment.