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"
|
||||
onItemClick={(streamer_name: string) => (window.location.href = `/${streamer_name}`)}
|
||||
extraClasses="min-h-[calc((20vw+20vh)/4)] bg-[var(--liveNow)]"
|
||||
itemExtraClasses="min-w-[calc(12vw+12vh/2)]"
|
||||
amountForScroll={3}
|
||||
itemExtraClasses="w-[calc(12vw+12vh/2)]"
|
||||
amountForScroll={4}
|
||||
/>
|
||||
|
||||
<ListRow
|
||||
@@ -81,8 +81,8 @@ const ResultsPage: React.FC = () => {
|
||||
onItemClick={(category_name: string) => navigate(`/category/${category_name}`)}
|
||||
titleClickable={true}
|
||||
extraClasses="min-h-[calc((20vw+20vh)/4)] bg-[var(--liveNow)]"
|
||||
itemExtraClasses="min-w-[calc(12vw+12vh/2)]"
|
||||
amountForScroll={3}
|
||||
itemExtraClasses="w-[calc(12vw+12vh/2)]"
|
||||
amountForScroll={4}
|
||||
/>
|
||||
|
||||
<ListRow
|
||||
@@ -97,9 +97,9 @@ const ResultsPage: React.FC = () => {
|
||||
}))}
|
||||
title="Users"
|
||||
onItemClick={(username: string) => (window.location.href = `/user/${username}`)}
|
||||
amountForScroll={3}
|
||||
amountForScroll={4}
|
||||
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>
|
||||
|
||||
@@ -20,7 +20,7 @@ interface VideoPageProps {
|
||||
}
|
||||
|
||||
const VideoPage: React.FC<VideoPageProps> = ({ streamerId }) => {
|
||||
const { isLoggedIn } = useAuth();
|
||||
const { isLoggedIn, username } = useAuth();
|
||||
const { streamerName } = useParams<{ streamerName: string }>();
|
||||
const [streamData, setStreamData] = useState<StreamType>();
|
||||
const [viewerCount, setViewerCount] = useState(0);
|
||||
@@ -180,7 +180,7 @@ const VideoPage: React.FC<VideoPageProps> = ({ streamerId }) => {
|
||||
{/* Streamer Info */}
|
||||
<div className="flex items-center gap-[0.75em] flex-col lg:flex-row">
|
||||
<div className="group flex flex-col items-center lg:items-start">
|
||||
{!isFollowing ? (
|
||||
{!isFollowing && username === streamerName ? (
|
||||
<button
|
||||
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)}
|
||||
|
||||
Reference in New Issue
Block a user