fix: prettier formatting, viteStaticCopy paths, HydrateFallback warning
- Fix prettier formatting in useCall.ts and initMatrix.ts (unblocks CI) - Fix viteStaticCopy stripBase so manifest.json and public/locales/ land at correct output paths (was getting extra 'public/' prefix from v4 path preservation behavior) - Silence react-router v7 HydrateFallback warning on root route (SPA has no SSR hydration, null is intentional)
This commit is contained in:
@@ -34,9 +34,7 @@ export const useCallSession = (room: Room): MatrixRTCSession => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const useCallMembers = (room: Room, session: MatrixRTCSession): CallMembership[] => {
|
export const useCallMembers = (room: Room, session: MatrixRTCSession): CallMembership[] => {
|
||||||
const [memberships, setMemberships] = useState<CallMembership[]>(
|
const [memberships, setMemberships] = useState<CallMembership[]>(session.memberships);
|
||||||
session.memberships,
|
|
||||||
);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const updateMemberships = () => {
|
const updateMemberships = () => {
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ export const createRouter = (clientConfig: ClientConfig, screenSize: ScreenSize)
|
|||||||
const mobile = screenSize === ScreenSize.Mobile;
|
const mobile = screenSize === ScreenSize.Mobile;
|
||||||
|
|
||||||
const routes = createRoutesFromElements(
|
const routes = createRoutesFromElements(
|
||||||
<Route>
|
<Route hydrateFallbackElement={null}>
|
||||||
<Route
|
<Route
|
||||||
index
|
index
|
||||||
loader={() => {
|
loader={() => {
|
||||||
|
|||||||
@@ -99,4 +99,3 @@ export const clearLoginData = async () => {
|
|||||||
window.localStorage.clear();
|
window.localStorage.clear();
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -24,14 +24,17 @@ const copyFiles = {
|
|||||||
{
|
{
|
||||||
src: 'public/manifest.json',
|
src: 'public/manifest.json',
|
||||||
dest: '',
|
dest: '',
|
||||||
|
rename: { stripBase: true },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
src: 'public/res/android',
|
src: 'public/res/android',
|
||||||
dest: 'public/',
|
dest: 'public/',
|
||||||
|
rename: { stripBase: 2 },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
src: 'public/locales',
|
src: 'public/locales',
|
||||||
dest: 'public/',
|
dest: 'public/',
|
||||||
|
rename: { stripBase: 1 },
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user