Skip to content

Commit

Permalink
fix footer
Browse files Browse the repository at this point in the history
  • Loading branch information
evertonstz committed Apr 23, 2024
1 parent 0808c96 commit 63fb2f5
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/components/DevicesModal/DevicesModal.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
import { Modal } from '@/components';
import { useDevicesLocalStorage } from '@/hooks';
import { Pax } from '@/pax';
import { TriangleAlert } from 'lucide-react';
import { useState } from 'react';

import AddDeviceFooter from '../AddDeviceFooter';
import DeviceCard from './DeviceCard';
import { SUPPORTED_DEVICES } from './constants';

export interface DevicesModalProps {
open: boolean;
onOpenChange: () => void;
}

const DevicesModal = ({ open, onOpenChange }: DevicesModalProps) => {
const [serialInput, setSerialInput] = useState<string | undefined>(undefined);
const defaultDevice = SUPPORTED_DEVICES[0];
const [deviceValue, setDeviceValue] =
useState<Pax.lib.Devices>(defaultDevice);
const deviceStore = useDevicesLocalStorage();

const renderCards = () => {
Expand All @@ -34,7 +41,14 @@ const DevicesModal = ({ open, onOpenChange }: DevicesModalProps) => {
};

const renderFooter = () => {
return <AddDeviceFooter />;
return (
<AddDeviceFooter
serialInput={serialInput}
setSerialInput={setSerialInput}
deviceValue={deviceValue}
setDeviceValue={setDeviceValue}
/>
);
};

return (
Expand Down

0 comments on commit 63fb2f5

Please sign in to comment.