Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ocitocit committed Oct 15, 2023
1 parent 39d52cc commit 86de765
Showing 1 changed file with 22 additions and 30 deletions.
52 changes: 22 additions & 30 deletions components/EmptyState.tsx
Original file line number Diff line number Diff line change
@@ -1,49 +1,41 @@
'use client'
import { useRouter } from 'next/navigation'
import React from 'react'
import Heading from './Heading'
import Button from './Button'
'use client';
import { useRouter } from 'next/navigation';
import React from 'react';
import Heading from './Heading';
import Button from './Button';

interface EmptyStateProps {
title?: string
subTitle?: string
showReset?: boolean
title?: string;
subTitle?: string;
showReset?: boolean;
}

const EmptyState: React.FC<EmptyStateProps> = ({
title = 'No exact matches',
subTitle = 'Try changing or removing somw of your filters',
showReset
}) => {
const router = useRouter()
const router = useRouter();

return (
<div
className='
h-[60vh]
flex
flex-col
justify-center
items-center
gap-2
'
className="
flex
h-[60vh]
flex-col
items-center
justify-center
gap-2
"
>
<Heading
center
title={title}
subTitle={subTitle}
/>
<div className="w-48 mt-4">
<Heading center title={title} subTitle={subTitle} />
<div className="mt-4 w-48">
{showReset && (
<Button
outline
label='Remove all filters'
onClick={() => router.push('/')}
/>
<Button outline label="Remove all filters" onClick={() => router.push('/')} />
)}
</div>
</div>
)
}
);
};

export default EmptyState;

0 comments on commit 86de765

Please sign in to comment.