Skip to content

Commit 0d55295

Browse files
committed
fix: rm duplicate template fetch
1 parent 1ee772a commit 0d55295

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

src/routes/Boards/Boards.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import {useTranslation} from "react-i18next";
22
import {Outlet, useLocation, useNavigate} from "react-router";
3-
import {useEffect, useState} from "react";
3+
import {useState} from "react";
44
import {Input} from "components/Input/Input";
55
import {HeaderBar} from "components/HeaderBar";
66
import classNames from "classnames";
7-
import {getTemplates} from "store/features";
8-
import {useAppDispatch, useAppSelector} from "store";
7+
import {useAppSelector} from "store";
98
import {ImportBoard, ImportBoardButton} from "components/ImportBoard";
109
import {Switch} from "components/Switch/Switch";
1110
import {SearchIcon} from "components/Icon";
@@ -18,7 +17,6 @@ export const Boards = () => {
1817
const {t} = useTranslation();
1918
const location = useLocation();
2019
const navigate = useNavigate();
21-
const dispatch = useAppDispatch();
2220

2321
// path segments after "/boards", e.g. ["edit-board", "<uuid>", "settings"].
2422
const subPaths = location.pathname.split("/").filter(Boolean).slice(1);
@@ -36,11 +34,6 @@ export const Boards = () => {
3634
const allowAnonymousBoardCreation = useAppSelector((state) => state.view.allowAnonymousBoardCreation);
3735
const canCreateBoard = !isAnonymous || allowAnonymousBoardCreation;
3836

39-
// init templates
40-
useEffect(() => {
41-
dispatch(getTemplates());
42-
}, [dispatch]);
43-
4437
const renderTitle = () => {
4538
switch (boardView) {
4639
case "templates":

0 commit comments

Comments
 (0)