| 1 | import { useAppSelector } from "../redux/hooks"; |
| 2 | import { selectSelectedChatModel } from "../redux/slices/configSlice"; |
| 3 | import { FREE_TRIAL_LIMIT_REQUESTS } from "../util/freeTrial"; |
| 4 | import { getLocalStorage } from "../util/localStorage"; |
| 5 | import FreeTrialProgressBar from "./loaders/FreeTrialProgressBar"; |
| 6 | |
| 7 | function Footer() { |
| 8 | const defaultModel = useAppSelector(selectSelectedChatModel); |
| 9 | |
| 10 | if (defaultModel?.provider === "free-trial") { |
| 11 | return ( |
| 12 | <footer className="flex flex-col border-0 border-t border-solid border-t-zinc-700 px-2 py-2"> |
| 13 | <FreeTrialProgressBar |
| 14 | completed={getLocalStorage("ftc") ?? 0} |
| 15 | total={FREE_TRIAL_LIMIT_REQUESTS} |
| 16 | /> |
| 17 | </footer> |
| 18 | ); |
| 19 | } |
| 20 | return null; |
| 21 | } |
| 22 | |
| 23 | export default Footer; |