mirror of
https://github.com/tloncorp/landscape.git
synced 2024-12-01 10:55:45 +03:00
Always show invite link settings
This commit is contained in:
parent
e01bce5770
commit
434bae33a4
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user