mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-10-21 23:08:15 +00:00
feat(app): add mobile settings button
This commit is contained in:
@@ -4,14 +4,13 @@ import { File } from './ChatWindow';
|
|||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import WeatherWidget from './WeatherWidget';
|
import WeatherWidget from './WeatherWidget';
|
||||||
import NewsArticleWidget from './NewsArticleWidget';
|
import NewsArticleWidget from './NewsArticleWidget';
|
||||||
|
import SettingsButtonMobile from '@/components/Settings/SettingsButtonMobile';
|
||||||
|
|
||||||
const EmptyChat = () => {
|
const EmptyChat = () => {
|
||||||
return (
|
return (
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
<div className="absolute w-full flex flex-row items-center justify-end mr-5 mt-5">
|
<div className="absolute w-full flex flex-row items-center justify-end mr-5 mt-5">
|
||||||
<Link href="/settings">
|
<SettingsButtonMobile />
|
||||||
<Settings className="cursor-pointer lg:hidden" />
|
|
||||||
</Link>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col items-center justify-center min-h-screen max-w-screen-sm mx-auto p-2 space-y-4">
|
<div className="flex flex-col items-center justify-center min-h-screen max-w-screen-sm mx-auto p-2 space-y-4">
|
||||||
<div className="flex flex-col items-center justify-center w-full space-y-8">
|
<div className="flex flex-col items-center justify-center w-full space-y-8">
|
||||||
|
21
src/components/Settings/SettingsButtonMobile.tsx
Normal file
21
src/components/Settings/SettingsButtonMobile.tsx
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
import { Settings } from 'lucide-react';
|
||||||
|
import { useState } from 'react';
|
||||||
|
import SettingsDialogue from './SettingsDialogue';
|
||||||
|
import { AnimatePresence } from 'framer-motion';
|
||||||
|
|
||||||
|
const SettingsButtonMobile = () => {
|
||||||
|
const [isOpen, setIsOpen] = useState<boolean>(false);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<button className="lg:hidden" onClick={() => setIsOpen(true)}>
|
||||||
|
<Settings />
|
||||||
|
</button>
|
||||||
|
<AnimatePresence>
|
||||||
|
{isOpen && <SettingsDialogue isOpen={isOpen} setIsOpen={setIsOpen} />}
|
||||||
|
</AnimatePresence>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default SettingsButtonMobile;
|
Reference in New Issue
Block a user