Always show invite link settings

This commit is contained in:
~midsum-salrux 2023-03-30 15:25:35 -04:00
parent e01bce5770
commit 434bae33a4
2 changed files with 0 additions and 18 deletions

View File

@ -38,7 +38,6 @@ import { Bullet } from '../components/icons/Bullet';
import SearchSystemPreferences from './SearchSystemPrefences';
import { ShortcutPrefs } from './ShortcutPrefs';
import { AttentionAndPrivacy } from './AttentionAndPrivacy';
import { useReelInstalled } from "../state/invites"
interface SystemPreferencesSectionProps {
url: string;
@ -81,7 +80,6 @@ export const SystemPreferences = (
.filter((charge) => charge.desk !== 'landscape');
const isMobile = useMedia('(max-width: 639px)');
const settingsPath = isMobile ? `${match.url}/:submenu` : '/';
const reelInstalled = useReelInstalled();
const matchSub = useCallback(
(target: string, desk?: string) => {
@ -197,7 +195,6 @@ export const SystemPreferences = (
<SystemPreferencesSection
url={subUrl('invites')}
active={matchSub('invites')}
visible={reelInstalled}
>
<InvitesIcom className="mr-3 h-6 w-6 rounded-md text-gray-600" />
Invite Links

View File

@ -1,21 +1,6 @@
import api from '../state/api';
import { useState, useEffect } from 'react';
export function useReelInstalled() {
const [reelInstalled, setReelInstalled] = useState(false);
useEffect(() => {
api.scry<{url: string}>({
app: 'reel',
path: '/bait'
}).then(({url}) => {
setReelInstalled(true);
});
}, []);
return reelInstalled
}
export default function useInviteState() {
const [baitURL, setBaitURL] = useState('');
const [loaded, setLoaded] = useState(false)