Commit c2fa9a0f by Arjun Jhukal

minor changes

parent 5c392a45
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import { useGetChatbotSettingQuery } from '@/services/settingApi'; import { useGetChatbotSettingQuery } from '@/services/settingApi';
import { Button, Typography } from '@mui/material'; import { Button, Typography } from '@mui/material';
import Image from 'next/image'; import Image from 'next/image';
import GlassWrapper from '../molecules/GlassWrapper';
export default function Chatbot() { export default function Chatbot() {
const { data } = useGetChatbotSettingQuery(); const { data } = useGetChatbotSettingQuery();
...@@ -12,45 +13,47 @@ export default function Chatbot() { ...@@ -12,45 +13,47 @@ export default function Chatbot() {
const isVideo = fileUrl?.toLowerCase().endsWith(".mp4"); const isVideo = fileUrl?.toLowerCase().endsWith(".mp4");
return ( return (
<Button <GlassWrapper>
className=" max-w-fit px-8!" <Button
variant="contained" className=" max-w-fit px-8!"
color="primary" variant="text"
fullWidth color="primary"
LinkComponent={"a"} // fullWidth
href={data?.data?.chatbot_link || ""} LinkComponent={"a"}
target='_black' href={data?.data?.chatbot_link || ""}
sx={{ target='_black'
justifyContent: "start" sx={{
}} justifyContent: "start"
> }}
<div className=" w-full flex! justify-start! items-center! gap-4"> >
{fileUrl && ( <div className=" w-full flex! justify-start! items-center! gap-4">
isVideo ? ( {fileUrl && (
<video isVideo ? (
autoPlay <video
loop autoPlay
muted loop
playsInline muted
className="w-11 h-11 rounded-full object-cover" playsInline
> className="w-11 h-11 rounded-full object-cover"
<source src={fileUrl} type="video/mp4" /> >
</video> <source src={fileUrl} type="video/mp4" />
) : ( </video>
<Image ) : (
src={fileUrl} <Image
alt="chatbot" src={fileUrl}
width={44} alt="chatbot"
height={44} width={44}
className="rounded-full object-cover" height={44}
/> className="rounded-full object-cover"
) />
)} )
)}
<Typography variant="subtitle2"> <Typography variant="subtitle2">
{label} {label}
</Typography> </Typography>
</div> </div>
</Button> </Button>
</GlassWrapper>
); );
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment