- Added `useViewTransitions` hook to enable view transitions in the app. - Created `useNavigateWithTransition` for navigation with transitions. - Integrated view transitions in `ClientRoot`, `HomeTab`, `InboxTab`, and `SettingsTab`. - Introduced `AnimatedOutlet` and `RouteTransition` components for route-based animations. - Enhanced CSS for transitions and added a new `twilightTheme`. - Updated Vite configuration to serve sound and font assets. - Added support for reaction notifications in the room utility. - Created `DirectList` and related components for direct messaging functionality.
28 lines
573 B
TypeScript
28 lines
573 B
TypeScript
import React from 'react';
|
|
import { Outlet, useLocation } from 'react-router-dom';
|
|
|
|
/**
|
|
* Wrapper for Outlet that adds route-based animation
|
|
* Forces remount on route change by using location as key
|
|
*/
|
|
export function AnimatedOutlet() {
|
|
const location = useLocation();
|
|
|
|
return (
|
|
<div
|
|
key={location.pathname}
|
|
data-route-transition="true"
|
|
style={{
|
|
flex: 1,
|
|
minWidth: 0,
|
|
minHeight: 0,
|
|
overflow: 'hidden',
|
|
display: 'flex',
|
|
flexDirection: 'column',
|
|
}}
|
|
>
|
|
<Outlet />
|
|
</div>
|
|
);
|
|
}
|