feat(web): connect quick share flow

Signed-off-by: JustMe <mr.toing@outlook.com>
This commit is contained in:
justme committed 2026-10-02 00:59:37 +08:00
1 parent 53768a195d
commit e02e024605
138 files changed
+10614

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import { App } from '@/app/App';
import { takeLinkFromLocation } from '@/app/entry';
import { useChannels } from '@/store/channels';
import { useShares } from '@/store/shares';
import { initTheme } from '@/lib/theme';
import '@/styles/tokens.css';
import '@/styles/base.css';
import '@/styles/transitions.css';
// 先取走 fragment 里的密钥并清掉地址栏,再做任何别的事
const link = takeLinkFromLocation();
if (link?.kind === 'channel') useChannels.getState().setPendingLink(link.link);
if (link?.kind === 'share') useShares.getState().setPendingLink(link.link);
initTheme();
createRoot(document.getElementById('root')!).render(
<StrictMode>
<App />
</StrictMode>,
);