24 lines
472 B
TypeScript
24 lines
472 B
TypeScript
import { isMobile } from "react-device-detect";
|
|
import AuthDesktop from "./AuthDesktop";
|
|
import AuthMobile from "./AuthMobile";
|
|
|
|
interface AuthProps {
|
|
isAuth?: boolean;
|
|
}
|
|
|
|
const Auth = ({ isAuth = true }: AuthProps) => {
|
|
const userName = "Full Name";
|
|
|
|
return (
|
|
<>
|
|
{isMobile ? (
|
|
<AuthMobile isAuth={isAuth} userName={userName} />
|
|
) : (
|
|
<AuthDesktop isAuth={isAuth} userName={userName} />
|
|
)}
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default Auth;
|