Write a React component that conditionally displays 'Logged In' or 'Logged Out' based on a hardcoded boolean state.
EasyProblem Statement
Write a React component that conditionally displays 'Logged In' or 'Logged Out' based on a hardcoded boolean state.
Sample Input
isLoggedIn = true
Sample Output
Logged In (if true) or Logged Out (if false).
Limits
Time: 2s · Memory: 256 MB
Code Editor
00:00
import React from "react";
const LoginStatus = () => {
const isLoggedIn = true; // Hardcoded state
return (
// Conditionally display "Logged In" or "Logged Out"
<></>
);
};
export default LoginStatus;
Input
isLoggedIn = true
Expected Output
Logged In (if true) or Logged Out (if false).