From 8168218491ef454576079ad119e5deacf879d383 Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Tue, 20 Apr 2021 11:01:29 +0300
Subject: refactor: strongly type API Client hooks

---
 src/components/Select.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/components/Select.tsx')

diff --git a/src/components/Select.tsx b/src/components/Select.tsx
index e65f8c4..19f2aab 100644
--- a/src/components/Select.tsx
+++ b/src/components/Select.tsx
@@ -8,13 +8,13 @@ export interface Option {
 
 export interface Props extends React.SelectHTMLAttributes<HTMLSelectElement> {
   label?: string;
-  options: Option[];
+  options?: Option[];
 }
 
 const focusStyles = 'focus:outline-none focus:shadow focus:border-gray-400';
 const baseStyles = 'p-2 border bg-white border-gray-300 rounded-sm';
 
-const SelectBase: React.FC<Props> = ({ label, options, ...props }) => {
+const SelectBase: React.FC<Props> = ({ label, options = [], ...props }) => {
   return (
     <div className="m-2 mb-4 flex flex-col">
       <label htmlFor={props?.name} className="mb-1 text-sm text-gray-600">{label}</label>
-- 
cgit v1.2.3

