forked from github/plane
fix: eslint issues and reconfiguring (#3891)
* fix: eslint fixes --------- Co-authored-by: gurusainath <gurusainath007@gmail.com>
This commit is contained in:
committed by
GitHub
parent
921b9078f1
commit
3d09a69d58
@@ -67,13 +67,13 @@ const DropdownList: React.FC<DropDownListProps> = (props) => {
|
||||
|
||||
const DropdownItem: React.FC<DropdownItemProps> = (props) => {
|
||||
const { item } = props;
|
||||
const { display, children, as: as_, href, onClick, isSelected } = item;
|
||||
const { display, children, as: itemAs, href, onClick, isSelected } = item;
|
||||
|
||||
const [open, setOpen] = useState(false);
|
||||
|
||||
return (
|
||||
<div className="group relative flex w-full gap-x-6 rounded-lg p-1">
|
||||
{(!as_ || as_ === "button" || as_ === "div") && (
|
||||
{(!itemAs || itemAs === "button" || itemAs === "div") && (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
@@ -94,7 +94,7 @@ const DropdownItem: React.FC<DropdownItemProps> = (props) => {
|
||||
</button>
|
||||
)}
|
||||
|
||||
{as_ === "link" && <Link href={href || "#"}>{display}</Link>}
|
||||
{itemAs === "link" && <Link href={href || "#"}>{display}</Link>}
|
||||
|
||||
{children && <DropdownList open={open} handleClose={() => setOpen(false)} items={children} />}
|
||||
</div>
|
||||
|
||||
@@ -9,10 +9,10 @@ let rootStore: RootStore = new RootStore();
|
||||
export const MobxStoreContext = createContext<RootStore>(rootStore);
|
||||
|
||||
const initializeStore = () => {
|
||||
const _rootStore: RootStore = rootStore ?? new RootStore();
|
||||
if (typeof window === "undefined") return _rootStore;
|
||||
if (!rootStore) rootStore = _rootStore;
|
||||
return _rootStore;
|
||||
const singletonRootStore: RootStore = rootStore ?? new RootStore();
|
||||
if (typeof window === "undefined") return singletonRootStore;
|
||||
if (!rootStore) rootStore = singletonRootStore;
|
||||
return singletonRootStore;
|
||||
};
|
||||
|
||||
export const MobxStoreProvider = ({ children }: any) => {
|
||||
|
||||
@@ -49,9 +49,7 @@
|
||||
"@types/react-dom": "^18.2.17",
|
||||
"@types/uuid": "^9.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.48.2",
|
||||
"eslint": "8.34.0",
|
||||
"eslint-config-custom": "*",
|
||||
"eslint-config-next": "13.2.1",
|
||||
"tailwind-config-custom": "*",
|
||||
"tsconfig": "*"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user