* refactor: replacing mobx with jotai Signed-off-by: James <james@jan.ai> Co-authored-by: James <james@jan.ai> Co-authored-by: Louis <louis@jan.ai>
17 lines
468 B
TypeScript
17 lines
468 B
TypeScript
import React from "react";
|
|
import JanImage from "../JanImage";
|
|
import { setActiveConvoIdAtom } from "@/_helpers/JotaiWrapper";
|
|
import { useSetAtom } from "jotai";
|
|
|
|
const CompactLogo: React.FC = () => {
|
|
const setActiveConvoId = useSetAtom(setActiveConvoIdAtom);
|
|
|
|
return (
|
|
<button onClick={() => setActiveConvoId(undefined)}>
|
|
<JanImage imageUrl="/icons/app_icon.svg" width={28} height={28} />
|
|
</button>
|
|
);
|
|
};
|
|
|
|
export default React.memo(CompactLogo);
|