11import { useTranslation } from "react-i18next" ;
22import { Outlet , useLocation , useNavigate } from "react-router" ;
3- import { useEffect , useState } from "react" ;
3+ import { useState } from "react" ;
44import { Input } from "components/Input/Input" ;
55import { HeaderBar } from "components/HeaderBar" ;
66import classNames from "classnames" ;
7- import { getTemplates } from "store/features" ;
8- import { useAppDispatch , useAppSelector } from "store" ;
7+ import { useAppSelector } from "store" ;
98import { ImportBoard , ImportBoardButton } from "components/ImportBoard" ;
109import { Switch } from "components/Switch/Switch" ;
1110import { 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