fixed language switching in the frontend
This commit is contained in:
@@ -1016,7 +1016,7 @@ const PackageDetailGrid: React.FC<PackageDetailGridProps> = ({
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Details overlay */}
|
||||
{/* Details overlay */}
|
||||
{selectedPackage && (
|
||||
isMobile ? (
|
||||
<Sheet open={open} onOpenChange={setOpen}>
|
||||
@@ -1047,8 +1047,15 @@ const PackageDetailGrid: React.FC<PackageDetailGridProps> = ({
|
||||
|
||||
const handleDetailAutoFocus = (event: Event) => {
|
||||
event.preventDefault();
|
||||
dialogScrollRef.current?.scrollTo({ top: 0 });
|
||||
dialogHeadingRef.current?.focus();
|
||||
|
||||
// Guard in case refs are not in scope when autofocusing
|
||||
if (typeof dialogScrollRef !== 'undefined') {
|
||||
dialogScrollRef.current?.scrollTo({ top: 0 });
|
||||
}
|
||||
|
||||
if (typeof dialogHeadingRef !== 'undefined') {
|
||||
dialogHeadingRef.current?.focus();
|
||||
}
|
||||
};
|
||||
|
||||
Packages.layout = (page: React.ReactNode) => page;
|
||||
|
||||
Reference in New Issue
Block a user