put link to home in "layout"
This commit is contained in:
@@ -8,6 +8,7 @@ import { HomePage } from "./pages/home";
|
|||||||
import { PodcastPage } from "./pages/podcast";
|
import { PodcastPage } from "./pages/podcast";
|
||||||
import { PlayerProvider } from "./player/provider";
|
import { PlayerProvider } from "./player/provider";
|
||||||
import { Player } from "./player/player";
|
import { Player } from "./player/player";
|
||||||
|
import { Link } from "react-router";
|
||||||
|
|
||||||
const queryClient = new QueryClient({
|
const queryClient = new QueryClient({
|
||||||
defaultOptions: {
|
defaultOptions: {
|
||||||
@@ -23,6 +24,9 @@ createRoot(document.getElementById("root")!).render(
|
|||||||
<PlayerProvider>
|
<PlayerProvider>
|
||||||
<div className="max-w-[1440px] w-full mx-auto p-2 relative">
|
<div className="max-w-[1440px] w-full mx-auto p-2 relative">
|
||||||
<BrowserRouter>
|
<BrowserRouter>
|
||||||
|
<Link to="/" className="w-fit">
|
||||||
|
<h1 className="text-3xl font-semibold">podcaster</h1>
|
||||||
|
</Link>
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path="/" element={<HomePage />} />
|
<Route path="/" element={<HomePage />} />
|
||||||
<Route path="/podcasts/:id" element={<PodcastPage />} />
|
<Route path="/podcasts/:id" element={<PodcastPage />} />
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { Link } from "react-router";
|
|
||||||
import { usePodcastsQuery } from "../api/podcasts";
|
import { usePodcastsQuery } from "../api/podcasts";
|
||||||
import { NewPodcastForm } from "../components/NewPodcastForm";
|
import { NewPodcastForm } from "../components/NewPodcastForm";
|
||||||
|
|
||||||
@@ -7,10 +6,6 @@ export const HomePage = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Link to="/">
|
|
||||||
<h1 className="text-3xl font-semibold">podcaster</h1>
|
|
||||||
</Link>
|
|
||||||
|
|
||||||
<NewPodcastForm />
|
<NewPodcastForm />
|
||||||
|
|
||||||
<div className="grid grid-cols-1 sm:grid-cols-[repeat(auto-fit,250px)] gap-3 mt-5">
|
<div className="grid grid-cols-1 sm:grid-cols-[repeat(auto-fit,250px)] gap-3 mt-5">
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import {
|
|||||||
usePodcastEpisodesQuery,
|
usePodcastEpisodesQuery,
|
||||||
useUpdateEpisodeMutation,
|
useUpdateEpisodeMutation,
|
||||||
} from "../api/episodes";
|
} from "../api/episodes";
|
||||||
import { Link } from "react-router";
|
|
||||||
import { usePlayerContext } from "../player/context";
|
import { usePlayerContext } from "../player/context";
|
||||||
import { PlayIcon } from "../icons/play";
|
import { PlayIcon } from "../icons/play";
|
||||||
import { PauseIcon } from "../icons/pause";
|
import { PauseIcon } from "../icons/pause";
|
||||||
@@ -80,10 +79,6 @@ export const PodcastPage = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Link to="/">
|
|
||||||
<h1 className="text-3xl font-semibold">podcaster</h1>
|
|
||||||
</Link>
|
|
||||||
|
|
||||||
<div className="mt-3 flex gap-2">
|
<div className="mt-3 flex gap-2">
|
||||||
<img src={podcast?.image} alt="" className="w-[300px] aspect-square" />
|
<img src={podcast?.image} alt="" className="w-[300px] aspect-square" />
|
||||||
<div className="flex flex-col gap-1">
|
<div className="flex flex-col gap-1">
|
||||||
|
|||||||
Reference in New Issue
Block a user