FIX: Remove ability to follow yourself when watching your stream
This commit is contained in:
@@ -62,8 +62,8 @@ const ResultsPage: React.FC = () => {
|
|||||||
title="Streams"
|
title="Streams"
|
||||||
onItemClick={(streamer_name: string) => (window.location.href = `/${streamer_name}`)}
|
onItemClick={(streamer_name: string) => (window.location.href = `/${streamer_name}`)}
|
||||||
extraClasses="min-h-[calc((20vw+20vh)/4)] bg-[var(--liveNow)]"
|
extraClasses="min-h-[calc((20vw+20vh)/4)] bg-[var(--liveNow)]"
|
||||||
itemExtraClasses="min-w-[calc(12vw+12vh/2)]"
|
itemExtraClasses="w-[calc(12vw+12vh/2)]"
|
||||||
amountForScroll={3}
|
amountForScroll={4}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ListRow
|
<ListRow
|
||||||
@@ -81,8 +81,8 @@ const ResultsPage: React.FC = () => {
|
|||||||
onItemClick={(category_name: string) => navigate(`/category/${category_name}`)}
|
onItemClick={(category_name: string) => navigate(`/category/${category_name}`)}
|
||||||
titleClickable={true}
|
titleClickable={true}
|
||||||
extraClasses="min-h-[calc((20vw+20vh)/4)] bg-[var(--liveNow)]"
|
extraClasses="min-h-[calc((20vw+20vh)/4)] bg-[var(--liveNow)]"
|
||||||
itemExtraClasses="min-w-[calc(12vw+12vh/2)]"
|
itemExtraClasses="w-[calc(12vw+12vh/2)]"
|
||||||
amountForScroll={3}
|
amountForScroll={4}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ListRow
|
<ListRow
|
||||||
@@ -97,9 +97,9 @@ const ResultsPage: React.FC = () => {
|
|||||||
}))}
|
}))}
|
||||||
title="Users"
|
title="Users"
|
||||||
onItemClick={(username: string) => (window.location.href = `/user/${username}`)}
|
onItemClick={(username: string) => (window.location.href = `/user/${username}`)}
|
||||||
amountForScroll={3}
|
amountForScroll={4}
|
||||||
extraClasses="min-h-[calc((20vw+20vh)/4)] bg-[var(--liveNow)]"
|
extraClasses="min-h-[calc((20vw+20vh)/4)] bg-[var(--liveNow)]"
|
||||||
itemExtraClasses="min-w-[calc(12vw+12vh/2)]"
|
itemExtraClasses="w-[calc(12vw+12vh/2)]"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ interface VideoPageProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const VideoPage: React.FC<VideoPageProps> = ({ streamerId }) => {
|
const VideoPage: React.FC<VideoPageProps> = ({ streamerId }) => {
|
||||||
const { isLoggedIn } = useAuth();
|
const { isLoggedIn, username } = useAuth();
|
||||||
const { streamerName } = useParams<{ streamerName: string }>();
|
const { streamerName } = useParams<{ streamerName: string }>();
|
||||||
const [streamData, setStreamData] = useState<StreamType>();
|
const [streamData, setStreamData] = useState<StreamType>();
|
||||||
const [viewerCount, setViewerCount] = useState(0);
|
const [viewerCount, setViewerCount] = useState(0);
|
||||||
@@ -180,7 +180,7 @@ const VideoPage: React.FC<VideoPageProps> = ({ streamerId }) => {
|
|||||||
{/* Streamer Info */}
|
{/* Streamer Info */}
|
||||||
<div className="flex items-center gap-[0.75em] flex-col lg:flex-row">
|
<div className="flex items-center gap-[0.75em] flex-col lg:flex-row">
|
||||||
<div className="group flex flex-col items-center lg:items-start">
|
<div className="group flex flex-col items-center lg:items-start">
|
||||||
{!isFollowing ? (
|
{!isFollowing && username === streamerName ? (
|
||||||
<button
|
<button
|
||||||
className="bg-purple-600 text-white font-bold px-[1.5em] py-[0.5em] rounded-md hover:bg-purple-700 text-sm"
|
className="bg-purple-600 text-white font-bold px-[1.5em] py-[0.5em] rounded-md hover:bg-purple-700 text-sm"
|
||||||
onClick={() => followUser(streamerId, setShowAuthModal)}
|
onClick={() => followUser(streamerId, setShowAuthModal)}
|
||||||
|
|||||||
Reference in New Issue
Block a user