slight refactoring

parent edf4286f
import React from 'react';
import {Outlet} from 'react-router-dom';
const Layout = () => {
const Layout: React.FunctionComponent = (): React.ReactElement => {
return (
<div className="container mx-auto px-96">
<Outlet />
......
import React, {useEffect} from 'react';
import {getArtists, selectArtists} from '../features/artist/artistSlice';
import {getArtists} from '../features/artist/artistSlice';
import {useAppDispatch, useAppSelector} from '../store/hooks';
import {useNavigate} from 'react-router-dom';
const HomePage = () => {
const HomePage: React.FunctionComponent = (): React.ReactElement => {
const {artists} = useAppSelector((state) => state.artist);
const dispatch = useAppDispatch();
const navigate = useNavigate();
......
......@@ -3,7 +3,7 @@ import {useLocation} from 'react-router-dom';
import {getTracksByQuery} from '../features/track/trackSlice';
import {useAppDispatch, useAppSelector} from '../store/hooks';
const Tracks = () => {
const Tracks: React.FunctionComponent = (): React.ReactElement => {
const {state} = useLocation();
const {tracks} = useAppSelector((state) => state.track);
const dispatch = useAppDispatch();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment